Live data from Hacker News

The Clean Language

clean.cs.ru.nl

11–20 of 48 posts

Re: The Clean Language

#11
post #8
post #3

Having never heard of this, I found the FAQ page an informative starting point. https://clean.cs.ru.nl/FAQ In simplistic terms, Clean seems to be a “better Haskell”. Edit: I just downloaded the bundle tar, looked at some sources and found out that vim has syntax coloring for Clean out of the box. Vim never ceases to amaze me. More Edit: Clean transpiles to C, which means that when you look at generated code, or just…

It's a pity this info is so hard to find. I had to click for a minute to find some example code, and thought: this is very much like Haskell. I wonder how it's better than Haskell, why not Idris/Coq/Adga, and why not contribute to any of the just mentioned projects. This info, combined with some code and a description of the target audience of the project would be very helpful indeed.

I'd never heard of it, either, but its Wikipedia page[1] says it's been around since 1987, so it's a little bit older than Haskell.

[1]: https://en.wikipedia.org/wiki/Clean_(programming_language)

Re: The Clean Language

#12
post #10
post #5

Earlier quoted context omitted.

The IO monad (in Haskell) will always be the same, no matter how much I/O you perform. A unique File type, for instance, will be different before and after I/O, reflecting that side effects are not idempotent. In other words, a change in mutable state is reflected in a change of type.

I'd love to see an example of this (the wikipedia page is not very clear to me). Is there a Clean or Idris program somewhere I can have a look at?

I studied clean a very long time ago, maybe 20 years, so I have no idea any more what the code looks like, but I can attempt to tell you the basic idea of this. There are objects that you cannot copy and also not use in multiple places as a function argument. E.g., if something is a file it is subject to these restrictions and functions that write to the file would accept the file as an argument and return a new object of type file that stands for the modified version of the file. This forces an explicit sequencing of side effects. This prevents the old version of the file still being usable in the code.

Re: The Clean Language

#13
post #7

With unique types and offering an alternative to monadic approach to pure functional programming, I always had an eye out for this language. I always found its syntax rather clean (no pun intended). Sadly there hasn't be much activity. or at least not much that could be discerned from its public facing website. I would love to see a revival in interest and development.

If I'm not mistaken, wasn't Clean closed source and commercial for a long time?

I was very interested years ago, but I kept on thinking that without opening up it would eventually just fade into oblivion and never went beyond the toying phase. A common fate for the many languages with a single and commercial reference compiler/interpreter.

Re: The Clean Language

#14
post #9
post #7

With unique types and offering an alternative to monadic approach to pure functional programming, I always had an eye out for this language. I always found its syntax rather clean (no pun intended). Sadly there hasn't be much activity. or at least not much that could be discerned from its public facing website. I would love to see a revival in interest and development.

I'd love to learn some about the "alternative to monadic approach to pure functional programming" but the project's website is utterly useless in helping me to find it.

I remember a rather comprehensive online pdf manual/book back in '99 when I went Clean for a period.

Re: The Clean Language

#16
post #7

With unique types and offering an alternative to monadic approach to pure functional programming, I always had an eye out for this language. I always found its syntax rather clean (no pun intended). Sadly there hasn't be much activity. or at least not much that could be discerned from its public facing website. I would love to see a revival in interest and development.

If I'm not mistaken, wasn't Clean closed source and commercial for a long time? I was very interested years ago, but I kept on thinking that without opening up it would eventually just fade into oblivion and never went beyond the toying phase. A common fate for the many languages with a single and commercial reference compiler/interpreter.

I seem to recall the same (of it being closed source initially)

Re: The Clean Language

#18
post #9
post #7

With unique types and offering an alternative to monadic approach to pure functional programming, I always had an eye out for this language. I always found its syntax rather clean (no pun intended). Sadly there hasn't be much activity. or at least not much that could be discerned from its public facing website. I would love to see a revival in interest and development.

I'd love to learn some about the "alternative to monadic approach to pure functional programming" but the project's website is utterly useless in helping me to find it.

The documentation [1] has a bit of information about using uniqueness types for IO and other cases.

[1] https://clean.cs.ru.nl/download/html_report/CleanRep.2.2_11....

Re: The Clean Language

#19

For a language called clean, it has a messy website.

How hard is it to include a syntax snippet? Same as with a lot of FOSS software which has a really long essay as explanation but not one screenshot of the GUI

Syntax matter few for this language I assume.

Re: The Clean Language

#20
post #3

Having never heard of this, I found the FAQ page an informative starting point. https://clean.cs.ru.nl/FAQ In simplistic terms, Clean seems to be a “better Haskell”. Edit: I just downloaded the bundle tar, looked at some sources and found out that vim has syntax coloring for Clean out of the box. Vim never ceases to amaze me. More Edit: Clean transpiles to C, which means that when you look at generated code, or just…

Cool that you found this. I’m a student at this university and most alumni I’ve spoken say it is only used for research and a masters degree course course [1]. What’s interesting is that the bachelor course on functional programming gets thought in Haskell. [1] https://sis.ru.nl/osiris-student/OnderwijsCatalogusSelect.do...

The undergraduate course was taught in Clean until a few years ago. Learning functional programming in Clean is a nightmare because it is impossible to find any helpful resources online about the language and the tooling is useless compared to Haskell's.
Post reply on HN