News for hackers. Stuff that matters.
[dead]
Re:Pike – a dynamic programming language with a syntax simil... by smac__ on Tuesday April 22, 2025 @11:14AM (#43763191)
Might be helpful to expand on what you mean specifically by the worst parts in your view and how Ruby's decisions provide better trade offs.
Re:Pike – a dynamic programming language with a syntax simil... by vinceguidry on Tuesday April 22, 2025 @12:34PM (#43763974)
Worst part of static compiled languages is the ugly syntax. Worst part of dynamic systems is they aren't machine-understandable. It's a direct tradeoff that results from formal language theory. Ruby isn't an answer to this, in fact it lies so far on the dynamic side of the fence that the one IDE targeted at it is more of an impediment than a help. There is no answer to the tradeoff, though there are a few current attempts, like Zest.

I personally don't need or want a computer to help me to understand the code I work on. It would be nice but not worth the need for a compile step. Pike looks like a compiled language, but doesn't even try to give you any of the advantages of machine understandability. It's purely cosmetic, why in the world would anyone want Python to look like C? If you want a dynamic language and don't want to deal with Ruby's... eccentricities, just use Python like everyone else.

https://github.com/jamii/zest

Re:Pike – a dynamic programming language with a syntax simil... by johnisgood on Tuesday April 22, 2025 @11:35AM (#43763400)
Why not Crystal?
Re:Pike – a dynamic programming language with a syntax simil... by vinceguidry on Tuesday April 22, 2025 @12:13PM (#43763777)
Ruby has static type system if I ever want to use it.
Re:Pike – a dynamic programming language with a syntax simil... by johnisgood on Tuesday April 22, 2025 @12:20PM (#43763823)
Crystal has static type-checking though. It is built into the language, unlike Ruby. Ruby is a dynamically typed language unlike Crystal. What am I misunderstanding here?
Re:Pike – a dynamic programming language with a syntax simil... by vinceguidry on Tuesday April 22, 2025 @12:35PM (#43763984)
Ruby's static type checker is built into the language, since 3.0.

https://github.com/ruby/rbs

You can use others if you like. I have used Crystal before, pretty quickly realized that it was never going to catch up with Ruby and the compile step isn't really all that much of an advantage. The few scripts that I want speed for, I just use mruby. Embed Ruby in C, runs super fast. Don't get all the cool Ruby libs or runtime reflection. But a way better tradeoff.

https://mruby.org/

Re:Pike – a dynamic programming language with a syntax simil... by johnisgood on Tuesday April 22, 2025 @12:53PM (#43764137)
Oh, thank you!