←back to thread

317 points est | 10 comments | | HN request time: 1.093s | source | bottom
Show context
KirinDave ◴[] No.17453884[source]
I hope I'm not the only person who reads this and really, really dislikes this.

If Python's gonna have breaking syntax, why not work on bringing it more in line with other modern languages that don't require special breakout syntax for expressions and rely more on functional features?

Are we still maintaining that lambdas are hard but suggesting expression-scoped variables are easy?

replies(3): >>17454262 #>>17454393 #>>17454442 #
1. _diyu ◴[] No.17454393[source]
Speaking as someone whose first dynamic language was python, it’s full of weird inconsistencies and I have no idea why anyone voluntarily chooses it when teaching programming. Granted all languages have warts, but people say python is easier to learn programming concepts in than other languages and I just don’t see it. I think they just mean the indentation syntax discourages confusingly indented code?
replies(1): >>17454444 #
2. icebraining ◴[] No.17454444[source]
What would you choose?
replies(3): >>17454474 #>>17454500 #>>17455322 #
3. amorousf00p ◴[] No.17454474[source]
C of course.
replies(1): >>17455039 #
4. _diyu ◴[] No.17454500[source]
For beginners? Whatever’s most popular on the job market. Ideally something with C syntax. Most languages are similar enough and their quirks can be avoided. Lisps are definitely a bad idea for this since the syntax is less intuitive to most people. ML languages like Haskell are not for everyone either, they require mathematically inclined minds. So maybe Java or JavaScript?
replies(4): >>17456413 #>>17456786 #>>17456908 #>>17521071 #
5. KirinDave ◴[] No.17455039{3}[source]
Why do you advocate such violence?
6. void_starer ◴[] No.17455322[source]
Scheme
replies(1): >>17518294 #
7. kalesho ◴[] No.17456413{3}[source]
Do you really believe JS is less wart-y than Python?
replies(1): >>17457482 #
8. cup-of-tea ◴[] No.17456786{3}[source]
When I read your first post I thought you were going to suggest something sensible like using a language geared toward paedagogy instead of whatever language du jour, but what you've written here is absurd. C does not have intuitive syntax. Many places already do teach Java as a first language and it's a disastter for many reasons. Lisp has very intuitive syntax. The only people who don't find it intuitive are those who have struggled with C-like syntax for long enough they can't see anything else.

The only reason Python is used is because it's popular so it seems to fit your criteria outlined in this comment just fine.

9. ehsankia ◴[] No.17456908{3}[source]
Depending on the market, python is one of the most popular languages. JS is probably on top also alongside C but neither of those are better starters.
10. KirinDave ◴[] No.17457482{4}[source]
Do you really believe Python is less warty than JavaScript?

A lot of the same numeric tower decision exist. There's a big schism between List Comprehensions and not, there's no simple way to ship closures around, and Python's concurrent I/O story is a sizzling hot mess.

JavaScript has plenty of problems. So does Python. So why does Python maintain everyone else is stupid for embracing programming constructs that have been deployed successfully since the 60's?