Re:Python’s tug of war between beginner-friendly and advance...
by BerislavLopac on Thursday February 04, 2021 @08:02PM
(#26031809)
Python has a built-in macro language. It's called Python.
Re:Python’s tug of war between beginner-friendly and advance...
by prionassembly on Friday February 05, 2021 @08:32AM
(#26036086)
Checkout Hylang, a Lispish language that compiles to Python, or maybe a Lispish syntax for Python? You can write pieces of code in .hy files and import them from .py files and vice-versa.
And then you have macros like in macros that traverse and transform code.
Re:Python’s tug of war between beginner-friendly and advance...
by pansa2 on Thursday February 04, 2021 @07:15PM
(#26031384)
But Python still has a reputation of being a simple language for beginners. I’m not sure how that reputation endures. Is it just because of the lightweight syntax?
Re:Python’s tug of war between beginner-friendly and advance...
by pjmlp on Friday February 05, 2021 @03:52AM
(#26034358)
Because Python is easier to start programming with, BASIC like, but a large majority fails to actually read the official documentation.
If they would do that, then they would realize Python is as powerful as Common Lisp, Ada, C++,.... with similar doc size in pages.
Re:Python’s tug of war between beginner-friendly and advance...
by type0 on Thursday February 04, 2021 @07:31PM
(#26031558)
It is deceptively simple. The Python learning curve looks like a snake - https://fabienmaussion.info/acinn_python_workshop/figures/xk...
Re:Python’s tug of war between beginner-friendly and advance...
by chriszhang on Friday February 05, 2021 @12:26AM
(#26033414)
Does this curve really represent everyone's experience?
I never experienced the "I hate Python" phase. I think I went straight from "So exciting" to "productive" phase with Python.
Re:Python’s tug of war between beginner-friendly and advance...
by prionassembly on Friday February 05, 2021 @08:34AM
(#26036099)
I hated Python 2 because it did the Wrong Thing with integer division (it didn't cast to floats), so my attempts at simple scripts just didn't work.
I reencountered Python at a data science course that was somehow mandatory for my masters in ODE numerics. It has a HUGE availability of standard and third-party packages, so you can be INSANELY productive. I'd write in Brainfuck if it was the only way to have like Pytorch and giotto-tda and networkx and fastapi in the same room.
This is such a fantastic analogy. Thank you!
C++ tries to be all the paradigms, even if they're bolted on. Python is similar in that regard. Complex OO, functional, exceptions, decorators, lots of container types, iterators, generators, operator overloads... The only thing it's missing is a macro language.
Python's "batteries included" standard library stance takes it even beyond the C++ analogy in terms of sheer volume of out of the box capabilities you get.