9 ms·
> return/if/while/break/continue actually work in Hylang. Common Lisp doesn't have these. Don't know where you get your facts from, but Common Lisp certainly h
by PuercoPop 8y ago
> return/if/while/break/continue actually work in Hylang. Common Lisp doesn't have these.
Don't know where you get your facts from, but Common Lisp certainly has those.
- foobar_ 8y agoThis is how it looks in Hylang because it maps onto Python semantics. (for [element (range 1 10)] (print element) (if (= element 5) (break))) I prefer this over Common Lisp because it looks shamelessly imperative.
- lispm 8y agoare you sure you have ever used Common Lisp? Maybe you were thinking about a different language. CL-USER 51 > (loop for element from 1 upto 10 do (print element) (if (= element 5) (return))) 1 2 3 4 5 NIL
- foobar_ 8y agoI have not used CL. I was horrified by the loop macro infact because I jumped from C to CL. I definitely made a stupid mistake of clubbing CL with scheme and clojure but in those languages they avoid these imperative features. I have made other points as well which makes Hylang different from the rest. 1. Hylang is a transpiler. Don't compare it with other lisps. Sibilant and Liskell are others in the same league. 2. Hylang has more useful libraries than all the other lisps. 3. Right now, I find Hylang best suited to write good old imperative dirty scripts that get stuff done. If you have used Python, Ruby, Perl ... it's practically heaven. 4. I stress the imperative part again because ... because that's my stupidity of choice. I'm a scripting guy! I'm familiar with that stuff. The best part of lisp for me is not the macros. It's that I don't have to google for syntax that often and "-" beats the "_" for variable names. 5. ipdb works too!
- lispm 8y ago> I was horrified by the loop macro infact because I jumped from C to CL. But you are aware that the FOR loop code you posted looks almost exactly like the LOOP FOR code in Common Lisp?
- foobar_ 8y agoI have never understood a single thing written by Guy L. Steele Jr. I think the the languages he has dealt with have had horrible specifications.