Live data from Hacker News

Coconut: Simple, elegant, Pythonic functional programming

coconut-lang.org

61–65 of 65 posts

Re: Coconut: Simple, elegant, Pythonic functional programming

#61
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…

> I've mostly switched over to Julia except for some legacy Python ML projects, and can confidently say there's no reason at all to start a new project in Python. What is the alternative to pytorch?

https://github.com/FluxML/Torch.jl

Re: Coconut: Simple, elegant, Pythonic functional programming

#62

Earlier quoted context omitted.

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

I'd recommend JavaScript unless you want to do something that python is specifically good for like machine learning. JavaScript has its own issues but it's not hard to learn and is used everywhere.

What brought me javascript from python was:

- functions were defined with `function` keyword instead of `def`

- variables were declared with `var`

Re: Coconut: Simple, elegant, Pythonic functional programming

#63
post #46

Earlier quoted context omitted.

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.

> Why is the ecosystem important when you can just use pyjulia Now you need to package a Julia application and Python application dependencies, instead of just a Python application. Also, pyjulia is a Julia binding for Python, used for calling Julia code from Python. The Python bindings for Julia seem to be library specific[1], and brittle. They require an additional special snowflake layer for Python dependencies[2]…

The main package for calling Python is PyCall [1]. It uses Conda by default but you can specify your own python location.

[1] https://github.com/JuliaPy/PyCall.jl

Re: Coconut: Simple, elegant, Pythonic functional programming

#64

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…

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.

On the other hand, taking the reality that everyone cares about white space, it makes enforcement of whitespace irrelevant while it makes copying and pasting and auto formatting code very very annoying or even impossible in some cases.

Re: Coconut: Simple, elegant, Pythonic functional programming

#65

Earlier quoted context omitted.

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.

It makes things that are trivial in other languages like copying and pasting chunks of code around or auto formatting code as you type into a very hard problem just to save some delimiters. It looks nice in code samples but sucks in real production codebases.

I am sorry I am replying so late, but seriously: you are copy-pasting code? Don't repeat yourself!

One more case of Python making good things easier and bad things harder!

Same thing with auto-formatting code as you type: IDEs are toxic you know, you would be more productive with vim.

Post reply on HN