Live data from Hacker News

Coconut: Simple, elegant, Pythonic functional programming

coconut-lang.org

41–50 of 65 posts

Re: Coconut: Simple, elegant, Pythonic functional programming

#41

Somewhat related is the language Nim: Pythonic, typed, and compiles to native code so it's super fast.

Nim deserves more recognition: it has that same feeling of being fast and easy to write, but has an actual type system and it's shockingly quick.

I'd argue as well, that Nim is actually what a lot of people are looking for when they look at using Go.

Re: Coconut: Simple, elegant, Pythonic functional programming

#42
post #5

This is cool stuff, but it's kind of sad that Python doesn't have any of this stuff. Apparently the Pythonic way to do anything is to repeat yourself, type a lot, implement flatten yourself, and cripple lambdas so no one will want to use them. It's a shame, because there's no reason why Python couldn't be an acceptable language for FP, like Julia. It'll never be great at it of course (just like Julia), but good enoug…

Python is an uninspired language with one serious design flaw (significant whitespace) that gained a lot of initial momentum because it was better than Perl. Since then it's accumulated new features in a random thrift store sort of process that has resulted in a fairly complex language.

In my opinion this whole generation of slow, dynamic, single threaded languages like Python, Ruby, and PHP only became popular because they were easy to implement and more productive for simple things than the statically typed alternatives of their day. Language design has come a long way since then and we can now do much better.

Re: Coconut: Simple, elegant, Pythonic functional programming

#43
post #5

This is cool stuff, but it's kind of sad that Python doesn't have any of this stuff. Apparently the Pythonic way to do anything is to repeat yourself, type a lot, implement flatten yourself, and cripple lambdas so no one will want to use them. It's a shame, because there's no reason why Python couldn't be an acceptable language for FP, like Julia. It'll never be great at it of course (just like Julia), but good enoug…

This is quite a bit of alarmism without acknowledging somewhat recent facts. Python's parser is being updated to allow for richer grammars, the community has embraced gradual typing, and the project hasn't been very conservative for years now. The withdrawal of Guido as BDFL is quite a step in that direction. Beyond the GIL and the lack of multi-line lambdas, Python is still a pleasant language to start new projects…

> Python is still a pleasant language to start new projects in.

I'm going to have to disagree with this, Python's packaging and project management is always a pain, and trying to get teammates setup previously with virtual-env/pipenv has always been rockier and slower (performance wise) than it ought to be. Julia has a much, much saner start, as does Rust.

Re: Coconut: Simple, elegant, Pythonic functional programming

#44
post #5

This is cool stuff, but it's kind of sad that Python doesn't have any of this stuff. Apparently the Pythonic way to do anything is to repeat yourself, type a lot, implement flatten yourself, and cripple lambdas so no one will want to use them. It's a shame, because there's no reason why Python couldn't be an acceptable language for FP, like Julia. It'll never be great at it of course (just like Julia), but good enoug…

Python is an uninspired language with one serious design flaw (significant whitespace) that gained a lot of initial momentum because it was better than Perl. Since then it's accumulated new features in a random thrift store sort of process that has resulted in a fairly complex language. In my opinion this whole generation of slow, dynamic, single threaded languages like Python, Ruby, and PHP only became popular becau…

I'm new to programming, and started a project recently using Python. What other languages you recommend that would be better?

Re: Coconut: Simple, elegant, Pythonic functional programming

#45
post #40

Earlier quoted context omitted.

This is quite a bit of alarmism without acknowledging somewhat recent facts. Python's parser is being updated to allow for richer grammars, the community has embraced gradual typing, and the project hasn't been very conservative for years now. The withdrawal of Guido as BDFL is quite a step in that direction. Beyond the GIL and the lack of multi-line lambdas, Python is still a pleasant language to start new projects…

I would disagree about it being pleasant, but let's ignore that. What advantages does Python have over Julia? Julia is even simpler than Python at this point, especially for researchers. A lot of non-programmers I know have been switching to Julia, as it's really easy to "write math" in it.

> What advantages does Python have over Julia?

You can get paid to write it and there is a mature library ecosystem around it.

Re: Coconut: Simple, elegant, Pythonic functional programming

#46
post #40

Earlier quoted context omitted.

I would disagree about it being pleasant, but let's ignore that. What advantages does Python have over Julia? Julia is even simpler than Python at this point, especially for researchers. A lot of non-programmers I know have been switching to Julia, as it's really easy to "write math" in it.

> What advantages does Python have over Julia? You can get paid to write it and there is a mature library ecosystem around it.

Why is the ecosystem important when you can just use pyjulia to call any python library you want? In regards to pay, many Python programmers aren't actually paid to program.

And regardless, I wasn't aware that getting paid to program in a language made the actual language itself better.

Re: Coconut: Simple, elegant, Pythonic functional programming

#47

Earlier quoted context omitted.

Your second assumption is pretty problematic. While Python is popular with the non-developer crowd, it's not like it isn't itself a professionally used language. And it is used extensively . I've used it as my primary work language for 5 years now in industries from processor design, embedded systems, and now data backends. In all cases, it was the easiest to use language that did the most work. More and more work fl…

Why is it problematic? I never said or implied that Python should only be used by non-programmers, just that I believe the majority of Python users would call themselves data scientists (or just any kind of scientist I guess) or analysts or traders or accountants or researchers or any other job where writing code is not your job, you just write code to help with your actual job. The point is, of course those people d…

I was trying to be gentle in saying it's wrong. Consider https://insights.stackoverflow.com/survey/2019. Python is the second most loved language on a survey where the majority of respondents have 'developer' in their title.

Re: Coconut: Simple, elegant, Pythonic functional programming

#48

Earlier quoted context omitted.

Python is an uninspired language with one serious design flaw (significant whitespace) that gained a lot of initial momentum because it was better than Perl. Since then it's accumulated new features in a random thrift store sort of process that has resulted in a fairly complex language. In my opinion this whole generation of slow, dynamic, single threaded languages like Python, Ruby, and PHP only became popular becau…

I'm new to programming, and started a project recently using Python. What other languages you recommend that would be better?

Julia is pretty great and has significantly saner package management.

Re: Coconut: Simple, elegant, Pythonic functional programming

#49
post #5

This is cool stuff, but it's kind of sad that Python doesn't have any of this stuff. Apparently the Pythonic way to do anything is to repeat yourself, type a lot, implement flatten yourself, and cripple lambdas so no one will want to use them. It's a shame, because there's no reason why Python couldn't be an acceptable language for FP, like Julia. It'll never be great at it of course (just like Julia), but good enoug…

Julia looks more like Python than a fp language tbo and that was why I staed away. The most elegant fp code I've seen was written in Scala.

Re: Coconut: Simple, elegant, Pythonic functional programming

#50
post #5

This is cool stuff, but it's kind of sad that Python doesn't have any of this stuff. Apparently the Pythonic way to do anything is to repeat yourself, type a lot, implement flatten yourself, and cripple lambdas so no one will want to use them. It's a shame, because there's no reason why Python couldn't be an acceptable language for FP, like Julia. It'll never be great at it of course (just like Julia), but good enoug…

Python is an uninspired language with one serious design flaw (significant whitespace) that gained a lot of initial momentum because it was better than Perl. Since then it's accumulated new features in a random thrift store sort of process that has resulted in a fairly complex language. In my opinion this whole generation of slow, dynamic, single threaded languages like Python, Ruby, and PHP only became popular becau…

How is significant whitespace a design flaw? Have you ever seen a professionally written program in any language where care in formatting did not extend to having whitespace under control? Gofmt comes to mind. Taking this reality that everyone cares about white space and making it a first class citizen is more of a stroke of genius than a design flaw IMHO.
Post reply on HN