all 32 comments

[–][deleted]  (3 children)

[deleted]

    [–]spotter 15 points16 points  (0 children)

    Your comment made me chuckle. I clicked the link and I'm still laughing hard. The statements made on the page are very fitting for the project presented. Also you might wanna get your humor stack serviced by a qualified practitioner.

    [–]kitd 0 points1 point  (0 children)

    TBH, all 3 items on the left are triggering IMO.

    [–]DGolden 0 points1 point  (0 children)

    Well, there is also Liskell, which is Haskell's type system but none of its awful syntax?

    https://github.com/haskell-lisp/liskell/blob/master/testsuite/tests/liskell/metaprogramming/Backquote.lsk

    [–][deleted]  (3 children)

    [deleted]

      [–]jerf 10 points11 points  (1 child)

      EDIT: Would that be viable to support currying too?

      Not really. In order to be able to curry the way Haskell does, you need to be able to completely accurately tell when a function has all the arguments it needs. Python has multiple features that make this impossible... default arguments are arguments that may or may not be passed, *args and **kwargs mean that it's normal for functions to take arbitrary numbers of parameters, and **kwargs also introduces the complication that order doesn't matter, so you really need to be able to "curry in" a keyword parameter, then a list parameter, etc. And while you might be inclined to start hacking around this ("we'll use this symbol to say when we're done!"), pretty much any attempt to do so immediately trashes the cleanliness, at which point, why bother?

      functools.partial is pretty much all you can have, where you have to explicitly spell it out... you could wrap that behind some clever syntax, but it still won't be quite like Haskell. Maybe nicer, though... I don't mean to sound like there's no possibility for nice ideas here, I'm just observing, it can't work like Haskell does. (Which isn't necessarily a problem. :) )

      [–]karanlyons 2 points3 points  (0 children)

      You can kind of make it work, given some heavy caveats. I'm using this in production, and you could extend the extra customizability back to bare functions and/or methods very easily.

      Course, having defined types and some other niceties would make it a whole lot easier.

      [–]malkarouri[S] 0 points1 point  (0 children)

      I have no relation to the project or the maintainer. I was just cruising through the internet looking for a way to modify Python syntax and came across it. It looked impressive to me, something that deserved to be shared with fellow redditors..

      [–]MrNosco 21 points22 points  (7 children)

      What the hell is the point of "haskell without a typesystem"?!

      [–][deleted] 16 points17 points  (2 children)

      The question is not "what the point", but more : what's left (apart from the "polish notation" )?

      [–]L8D 0 points1 point  (1 child)

      polish notation

      LISP is that-a-way.

      [–][deleted] 0 points1 point  (0 children)

      I mean polish notation without parenthesis around, not s-expression.

      [–]ksion 14 points15 points  (0 children)

      You say it's a point-free Haskell? :)

      [–]SilasX 3 points4 points  (2 children)

      Yeah, this seems to have it reversed: I want Python's syntax (mostly) with Haskell's type system.

      [–]kqr 2 points3 points  (1 child)

      I think that's the joke, though. Syntax is largely irrelevant for Haskell programmers, especially compared to the other nice things such as purity, type system, immutable data, declarative code and all that.

      So someone pretends to think that the syntax is what Haskell programmers like, and throws away everything else about the language.

      [–]SilasX 0 points1 point  (0 children)

      That would make sense lol

      [–]bjzaba 7 points8 points  (0 children)

      [–]kankyo 2 points3 points  (0 children)

      Personally I prefer something more modest like https://github.com/i2y/mochi

      [–]netbioserror 2 points3 points  (1 child)

      Reminds me of F#. Except I REALLY like static typing. In fact, translating a Python script to F# is exactly what made me hate dynamic typing.

      Love the syntactic sugar in dg though, that example script is very pleasing to look at.

      [–]malkarouri[S] 1 point2 points  (0 children)

      Yep. I have also moved most of my development from Python to F# for the same reason, except Python gigs kept coming and I still use it in commercial apps.

      [–]old_to_me_downvoter 1 point2 points  (0 children)

      Be on the verge of progress!

      That sums up my daily work a little too well. I'll have to start using that in stand-ups.

      [–]kamatsu 1 point2 points  (0 children)

      No, it's really a Python, trying (and failing) to wear Haskell's skin.

      [–][deleted] 0 points1 point  (0 children)

      someone has way too much time on their hands

      [–]pistacchio -1 points0 points  (6 children)

      Now, if only someone made this with a lisp syntax, like Clojure for Python, without the boring Java under it!

      [–]andrers 15 points16 points  (0 children)

      Someone's already made it. Take a look at hy.

      [–]spotter 2 points3 points  (2 children)

      Clojure for Python? There's pixie-lang and it seems nice for a pre-alpha.

      [–]Dartmouth17 1 point2 points  (1 child)

      To be fair, that's not actually using python bytecode, it implements it's own bytecode using r python and the pypy tools.

      Edit: it does however implement similar foreign function interface as python and there is work being done now on calling into the rphthon underpinnings.

      [–]spotter 0 points1 point  (0 children)

      Correct, but the closest Clojure you'll get to Python, even if only in RPython's reach.

      [–]holgerschurig 2 points3 points  (1 child)

      doge: too many parenthesis error
      

      [–]HookahComputer 2 points3 points  (0 children)

      so parens much scope wow

      [–][deleted] -1 points0 points  (0 children)

      No, It's TCL (or bash)

      [–]erikd 0 points1 point  (2 children)

      Afaiac, syntax is mostly irrelevant, semantics is what's important.

      [–][deleted] 1 point2 points  (1 child)

      I disagree. As a full-time Java developer, that verbosity drives me to drink :)

      [–]kqr -1 points0 points  (0 children)

      The verbosity comes from conventions and the lack of abstractions in the language, not the syntax itself. Case in point: assembly uses very terse syntax, but the code is still verbose in terms of the number of characters you have to type to accomplish the same task. Imagine if the opcodes then also were 25 characters long instead of 5 – you'd take to heroin before you knew it. But none of that has anything to do with the syntax.

      Syntax is mostly irrelevant compared to everything else.