News for hackers. Stuff that matters.
Re:Show HN: The Shark Programming Language Realease 1.0.0 by soulbadguy on Friday March 24, 2023 @06:06PM (#35296306)
> Imagine a programming language with the syntax of python

I am not sure when the python syntax become such a beacon of quality, but that makes me genuinely sad; Especially with looking at all the other syntax (swift, kotlin, F#/ocaml, rust) out there.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by aspyct on Friday March 24, 2023 @06:30PM (#35296555)
Python syntax is predictable, readable and concise. What else do you need?
Re:Show HN: The Shark Programming Language Realease 1.0.0 by koito17 on Friday March 24, 2023 @06:44PM (#35296685)
That is not my experience having to deal with a Python codebase for the first time in my life recently. I do not enjoy attempting to understand the magical annotations everywhere, the terse, cryptic syntax of list comprehensions, random syntax trivia like array[::-1], tons of line noise in regular expressions, having to __format__ "private" symbols like this, and so on.

I obviously don't have experience with Python, but the only good thing about the syntax to my eyes is the vertical space savings you gain by doing away with curly braces.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by dragonwriter on Friday March 24, 2023 @06:48PM (#35296727)
> having to __format__ “private” symbols like this,

But…that’s not how you format “private” symbols in Python, conventionally; single leading underscore is; double leading is for identifiers you want mangled with classnames, and double leading and trailing is for special methods.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by Yoric on Saturday March 25, 2023 @01:04PM (#35304640)
In my book, special methods (aka protocols) are... well, let's say not the most beautiful part of Python. Lot's of poorly documented magic in there.
Re:Show HN: The Shark Programming Language Realease 1.0.0 by TylerE on Friday March 24, 2023 @08:00PM (#35297346)
Python does not have private symbols. __foo__ is just convention
Re:Show HN: The Shark Programming Language Realease 1.0.0 by ARandomerDude on Friday March 24, 2023 @11:20PM (#35298955)
Conventions that strong might as well be mandatory — at least if you are a decent coworker.
Re:Show HN: The Shark Programming Language Realease 1.0.0 by mkl on Friday March 24, 2023 @09:31PM (#35298176)
Magical annotations? Do you mean decorators? Or maybe types? Whether they're present at all depends on the code base, and most probably have neither.

[i*i for i in range(10)] is hardly terse or cryptic.

Python regular expressions are much like regular expressions anywhere else, so you're not really criticising Python there. You might need extra backslashes if you were trying to do them without raw strings (r'\s*' == '\\s*'), but that's hardly unique to Python either.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by Yoric on Saturday March 25, 2023 @01:03PM (#35304629)
I've worked professionally in Python and I find decorators quite magic, indeed. For better and for worse.
Re:Show HN: The Shark Programming Language Realease 1.0.0 by Hendrikto on Saturday March 25, 2023 @07:17AM (#35301537)
> random syntax trivia like array[::-1]

That‘s not random syntax trivia. It‘s a slice. Pretty generic and straighforward.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by cglong on Friday March 24, 2023 @06:20PM (#35296467)
I actually had someone disparage the F# syntax the other day, I guess because of its deviation from the top of the TIOBE Index :(
Re:Show HN: The Shark Programming Language Realease 1.0.0 by shogundev on Friday March 24, 2023 @06:10PM (#35296345)
I like swift and rust quite actually. Might make a shark VM from scratch in swift for the heck of it. :)
Re:Show HN: The Shark Programming Language Realease 1.0.0 by renox on Saturday March 25, 2023 @04:16AM (#35300560)
Rust as an example of good syntax, seriously? I don't know Rust but when I see examples they're not especially readable..

That said system languages have a disadvantage, they can't even concatenate two strings 'simply'.

Re:Show HN: The Shark Programming Language Realease 1.0.0 by Yoric on Saturday March 25, 2023 @01:02PM (#35304614)
As a long-time Rust programmer, I agree that the syntax is not the most readable around.

That being said, string concatenation is only marginally related to syntax. It's a matter of semantics, which go much deeper. There is a very good reason for which string concatenation isn't simpler in Rust.