[ home / bans / all ] [ qa / jp ] [ spg ] [ f / ec ] [ b / poll ] [ tv / bann ] [ toggle-new / tab ]

/spg/ - Spring

Seasonal board for the Spring Season

New Reply

Options
Comment
File
Whitelist Token
Spoiler
Password (For file deletion.)
Markup tags exist for bold, itallics, header, spoiler etc. as listed in " [options] > View Formatting "


[Return] [Bottom] [Catalog]

 No.582

python sucks, stop using it

 No.583

done

 No.584

Everyone knows it's slow as shit, but most code doesn't need to be fast in the first place.

 No.588

i only use it because i want a job. once i get good enough at C and C++ using them i will. i hate python.

 No.589

File:1ddeff731f09eff4217efdce8d….jpg (116.92 KB,848x1199)

python is the worst language for newcomers
they are forced to adapt the """pythonic""" way of doing things instead of generally good practices
the worst of them is list comprehension (the ugliest hack that can't be adapted to any other language) and being very unfriendly to functional programming (you can't have lambda of more than a single expression, which is an intentional limit)
it is only easy to write either procedural or class-oriented oop style (like c++/java) code in python, while having none of the performance of c++, the flexible smalltalk-style oop programming, or the concise and powerful functional programming
it is ok to use python if you are coming from a good programming background and understand it's severe deficiencies and only use it because some libraries requires it, but if you learn python as your first language, you are destined to be a script kiddie forever

 No.591

>>588
>C++
enjoy your
rtmap.cpp: In function `int main()':
rtmap.cpp:19: invalid conversion from `int' to `
std::_Rb_tree_node<std::pair<const int, double> >*'
rtmap.cpp:19: initializing argument 1 of `std::_Rb_tree_iterator<_Val, _Ref,
_Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val =
std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr =
std::pair<const int, double>*]'
rtmap.cpp:20: invalid conversion from `int' to `
std::_Rb_tree_node<std::pair<const int, double> >*'
rtmap.cpp:20: initializing argument 1 of `std::_Rb_tree_iterator<_Val, _Ref,
_Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val =
std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr =
std::pair<const int, double>*]'
E:/GCC3/include/c++/3.2/bits/stl_tree.h: In member function `void
std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::insert_unique(_II,
_II) [with _InputIterator = int, _Key = int, _Val = std::pair<const int,
double>, _KeyOfValue = std::_Select1st<std::pair<const int, double> >,
_Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int,
double> >]':
E:/GCC3/include/c++/3.2/bits/stl_map.h:272: instantiated from `void std::map<_
Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Input
Iterator = int, _Key = int, _Tp = double, _Compare = std::less<int>, _Alloc = st
d::allocator<std::pair<const int, double> >]'
rtmap.cpp:21: instantiated from here
E:/GCC3/include/c++/3.2/bits/stl_tree.h:1161: invalid type argument of `unary *
'

 No.592

>>589
> you are destined to be a script kiddie forever
I feel this way in my current job right now
at first in university i begin using c++ for most of my class projects or homework that required it as i took a c++ class
but i rather quickly transitioned to using python after I learned it as it had more accessible libraries and command line utilities available for me with out relying on university resources
After taking a development job where I'm currently using java and javascript, the way i approach problems/programming feels different if not wrong; especially when talking with my coworkers.

 No.593

>>589
>list comprehension (the ugliest hack that can't be adapted to any other language)
What does this mean? Haskell has list comprehensions, and you can trivially rewrite list comprehensions as map and filter which lots of languages have.

>if you learn python as your first language, you are destined to be a script kiddie forever
Same shit people said about BASIC, and you don't see people who grew up on BASIC using GOTO to write loops in languages that aren't assembly, or whatever practice people thought would carry over.

 No.594

>>592
Can you give an example? It's almost certainly more a difference in level of experience than what languages you've used in the past.

 No.595

>>594
Yeah that's almost certainly a big factor, i'm also the youngest of the new highers and my background is more in math/physics. It's probably not fair to say it's a language thing usually it's just that python and working alone would let me be really lazy and sloppy with the way i structure and approach my code. One noticeable thing is just the constant use of multi-file setups for programs. I only ever had a few files in my previous projects but now I couldn't count the number of folders and files that encompass the current work project. Probably also fair to mention it's a react site I'm working on right now and I only ever had minimal javascript experience before hand. I can't really speak to veracity of what the poster i quoted is saying other than i feel definitely feel like a script kiddie compared to my coworkers.

 No.596

Sorry anon, but it has a ton of libraries I need for astronomy and is basically the standard software for the field. Whether or not it is slow or 'inelegant' or whatever is largely irrelevant.

 No.597

>>595
Another big factor is if you're used to doing personal projects and haven't worked on big projects with other people much before. It's kind of a different world.

 No.598

>>582
8 and 4 seconds for me. But that maths thing really made me realize the demerit I have purely by not being from a maths background...
going to start getting into C again, along with python.

 No.599

The video isn't about python sucking, its about python begin a nice wrapper programming language for C++. Python's syntax is fast, C's execution is fast. You just combine them.

 No.600

>>599
such is the power of misappropriation

 No.1057

javascript sucks, stop using it

 No.1060

I used to care about all this stuff way back when I was first getting started, 'cause I wanted to learn the right thing. but then everyone kept complaining about something no matter what language I chose. so now I just use whatever works and I've genuinely finished way more projects since I made that decision. you're right that python's slow but unless you need speed for your program why the heck does that matter




[Return] [Top] [Catalog] [Post a Reply]
Delete Post [ ]

[ home / bans / all ] [ qa / jp ] [ spg ] [ f / ec ] [ b / poll ] [ tv / bann ] [ toggle-new / tab ]