-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why ZenScript? #24
Comments
Before y'all get too attached to the name ZenScript, please note I want to change it to Type-fu. Seems I better do something about this soon, before this ZenScript name gets adopted into everyone's consciousness by default. |
And frankly I would expect even otherwise Felix would still get very low adoption by the JavaScript/Java/Python mainstream because of Felix's syntax choices and making the language too powerful. I don't know about competing with C++, as I last coded in C++ in 2002. I could be wrong about that though. I am getting old (51) so I may be out-of-touch. Felix may be a great powerful language though. I don't know it well yet.
Swift doesn't have typeclasses. I read it facilitates a design pattern which can sort of give some of the benefits of typeclasses, but afaik the compiler isn't doing the heavy lifting. Also I remember something about Swift using the upper bits of a 64-bit value for something on Android (something about memory addressing afair). I forgot the details. Seemed really hokey when I was reading about it. Any way, we should expect Swift to be pretty good since its primary designer is apparently the creator of LLVM. I think we need to move reasonably quickly on something like ZenScript, because Swift is for example gaining momentum and it doesn't have typeclasses in earnest. I should probably expend some more time studying Swift and relay my findings.
Please continue that discussion here. It doesn't apply to Compiler Implementation. That is why I made this thread. |
Haha .. you're a spring chicken. I'm 61 :) Actually, Swift DOES have type classes. It doesn't call them that but it does have them. |
I would seriously fight you on that. Unless you can show me a useful language (as in, not some esoteric language no one uses) that has prototypal inheritance, JavaScript is actually one of the most useful languages out there. Also, it's the most used language in the world and it used by massive servers all the time. Optional typing through TypeScript massively improves the language of course (which is why Google is probably going to make a superset of JavaScript that is somewhat compatible with TypeScript, called SoundScript). JavaScript is based on Scheme and Self, two of my favorite languages. I wish it had some more features of Scheme of course, but overall, JavaScript is fast, powerful, available on all platforms (there's embedded systems running JS for christ's sake) and it has the best ecosystem by a long shot. |
I think this is important too, I talked about it before, but JavaScript's setTimeout model is pure genius. I'm not even sure which other language even has it? It's a very good concurrency model. It's simple, powerful and as you said @shelby3, a really good first step to build more useful abstractions on top of. It's basically a simple even queuing system. Most infinite loops in JS are written by: running the loop once, queuing it to run again. You yield priority to other processes by requeuing it (timeout of 0 works really well here). |
So Swift can do typeclasses. The part I missed before when I linked to this:
So you could do multiple associated type parameter typeclasses with the linked method. So I would say let's transpile to Swift (or just use Swift!), except:
Other reasons to create ZenScript instead of hoping to advance with Swift over time, is that syntax of Swift isn't ideal from my (and probably @keean's) perspective such as lacking a |
@shelby3 I can't see any evidence Swift can do multi-parameter type classes from following the link. |
@keean I think we'd write that instead |
Re: Why Zenscript? I wrote:
|
@shelby3 wrote:
The text was updated successfully, but these errors were encountered: