Live data from Hacker News

Pike – a dynamic programming language with a syntax similar to Java and C

pike.lysator.liu.se

21–30 of 75 posts

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#21
post #7

Of all the strengths that Java and C have, I would not call syntax one of them. :) So this title seems quite strange. Not the sales pitch I would make. It is understandable though, considering this language is 30+ years old. Probably not the decision you would make if you were to design it today: Switch statement with labels+fallthrough instead of a switch/match expression (even Java replaced that one with a switch e…

I think they point they're making is the syntax is familiar to what you probably already know.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#23
Brings back some memories of the webserver Roxen that had a GUI, if I remember correctly. It still seems to be semi-alive, although the download page looks broken.

https://en.wikipedia.org/wiki/Roxen_(web_server)

EDIT: Github repo https://github.com/pikelang/Roxen

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#24

It claims to be one of the fastest “scripting” languages, where can I see the numbers? Does it perform close to DaScript? Also, is it only an interpreted language or can I compile it too if I want? Is it like Ruby in the sense that I have to share the whole runtime with the ruby script or can I somehow share a standalone cross-platform executable? I’ll be honest, the design decision at first hand sight did not look t…

"string name = Stdio.stdin->gets();" It did say it was like C so the design decision you don't like is C

I don't think it goes both ways in this case. I wasn't a fan of their inspiration from C, it doesn't mean I don't like C.

I'm fine with C. Keep the focus on Pike.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#26
post #8

I remember coming across Pike about two decades ago (or more), as a young amateur developer... I couldn't understand why anyone would choose Pike. And today I still can't. Legacy projects?

It always seemed like a MUD language project that tried to recycle its efforts by taking on Python, Ruby, etc. There’s literally no reason to use this language unless you want to make MUD games or are just purely curious about the project.

That's a bit anachronistic. Pike was released in 1994, the same year as Perl 5.0 and Python 1.0. Ruby did not exist yet!

Being an offshoot of an existing MUD language it was quite usable even a young language, comparably good performance and a compelling C embedding. History could very well have been different. The 90s was a really good decade for dynamic languages.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#27

Taking the worst aspect of statically typed languages and mixing it with the worst part of dynamic schemes. I'll keep my Ruby, thanks.

Why not Crystal?

Ruby has static type system if I ever want to use it.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#29
Pike is described as a "dynamic" language, so I was expecting purely dynamic typing, yet the language uses Java/C-style variable declarations with explicit types.

It seems that these are (unsound) type hints, years before TypeScript made them cool:

> "If your program tries to put one type of value in a variable which was designed to hold another type of value, Pike may detect this" [emphasis mine]

https://pike.lysator.liu.se/docs/tut/fundamentals/index.md#t...

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#30

Earlier quoted context omitted.

Why not Crystal?

Ruby has static type system if I ever want to use it.

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?
Post reply on HN