7 ms·
Clean – A functional programming language
- emmelaich 9y agoYou wonder why Clean isn't as popular as Haskell and Ocaml. I've read it's the lack of community. The name doesn't help either.
- rixed 9y agoThe only reason why clean has always been confidential is this: "Developers wishing to distribute commercial applications (either publicly or privately) can purchase a commercial license." Although there seams to be a dual license now? Can anybody with more understanding of legal verbiage confirm that if I choose to use the bsd+lgpl then the above restriction don't hold anymore?
- rixed 9y agoNo change, according to c2wiki[0] it has always been phrased like that. [0]: http://wiki.c2.com/?CleanLanguage http://wiki.c2.com/?CleanLanguage
- pmontra 9y agoAccording to the wiki linked into the other answer > The company is not claiming that you can't sell your programs. The licensing only matters when it comes to modifying the compiler itself. which it makes sense. The language runtime is LGPL but the program you write is anything you want. At http://clean.cs.ru.nl/download/Clean24/CleanLicenseConditions.txt http://clean.cs.ru.nl/download/Clean24/CleanLicenseCondition... > Clean is available under a dual license. Users can choose which of these two licenses they wish to operate under: > 1 The Simplified BSD License (see below) applies to the libraries, runtime system and examples, the LGPL the standard GNU Lesser General Open Source license (see below) to the rest. The libraries, runtime system and examples consist of the files in the following directories (including subdirectories of these directories): > - Libraries and Examples (versions for Windows) > - StdEnv, data and examples (versions for Linux and Mac OS X) > - libraries, RuntimeSystem and CleanExamples (source code). > 2 A commercial license (see below) that can be purchased. Information on that license can be obtained from [check the original document for name and email] So, it should be ok as using any LGPL library on any proprietary program. I wonder if they are making any money from the commercial license or this confusion is only harming the language.
- scythe 9y agoI don't know if it's changed much, but I remember that several years ago I thought about trying to learn Clean but I gave up because it looked like Linux was a second-class platform and the Clean project mostly focused on a Windows IDE.
- pagnol 9y agoCan anybody comment on this?
- stonemetal 9y agoTheir documentation states: "The latest version 2.0 of the IDE is currently only available on the Wintel and MacOS/PowerPC platform. On the other platforms a much more restricted and older version of the IDE is available. " So it sounds about right to me.
- igouy 9y agoiirc the compiler and libraries worked fine with Linux, but work on the IDE was not being ported to Linux. Example, Clean programs working fine on Linux -- https://web.archive.org/web/20130101063215/http://benchmarksgame.alioth.debian.org:80/u32/clean.php https://web.archive.org/web/20130101063215/http://benchmarks...
- gvx 9y agoAn additional hurdle may be it's use of uniqueness typing (http://clean.cs.ru.nl/download/html_report/CleanRep.2.2_11.htm#_Uniqueness_Typing http://clean.cs.ru.nl/download/html_report/CleanRep.2.2_11.h...), which it uses for IO instead of monads. In my experience with Clean, uniqueness typing has been some kind of magic.
- toolslive 9y agoFunny how interpretations differ. I always considered the uniqueness typing approach to IO superior to the monadic approach.
- stewbrew 9y agoIt took ages for Haskell to become "popular". My personal impression is that OCaml was more popular in the past and lost ground in recent years. OCaml's story demonstrates though how difficult it is to turn an academic research language into a widely accepted tool that is (financially) supported by the industry. Clean had a performant compiler when Haskell was mostly interpreted and slow. Why didn't it take off? Maybe it wasn't the main goal of its developers once the publications were done.
- sitkack 9y agoLanguages don't win. Package management and distribution wins. Access and energy required for a viable solution.
- xyproto 9y agoC won befoee package managers and Linux distributions existed.
- icebraining 9y agoBecause it was the language of UNIX distributions (not called that, but it's the same concept).
- sitkack 9y agoThey went hand in hand. I know lots of people that installed Linux in the 90s so they could use GCC.
- pasquinelli 9y agowell, unix was written in it, making it a natural choice if you're writing unix programs, or if you are writing programs on a unix.
- brett40324 9y agoAnd symbiotically, C was written to write unix. edit: to note that by 'written' i mean designed and initially implemented.
- stonemetal 9y agoNo, I don't. I actually wonder why it gets mentioned. It is some professor's research project not an actual programming ecosystem. The documentation on the site is more than a decade old, it covers version 2.2 released in 2006. Want documentation on what has been happening since then? Pick up a research paper. By comparison Haskell has a dozen books on Amazon and plenty of newbie level documentation since multiple universities use it as a teaching language.
- zem 9y agoit was being developed on windows, and the gui library didn't work on linux. at least that's what kept me from picking it up, and i suspect a lot of the language enthusiasts who might have adopted it were similarly linux users, especially in the early 2000s
- joe_the_user 9y agoThe thing about syntax like this fac :: Int -> Int fac 0 = 1 fac n = n * fac (n-1) to me, is that all the statements of this function declaration seem "disconnected". I'm guessing the "fac" connects them but it seems less clear than open-closed brackets in a c-like language (and also more cluttered). Especially, I'm not sure what tells me I've reached the end of the function declaration. This may seem trivial but it's always put my off this variety of functional language.
- tueo23094 9y agoI don't program in functional environments, however this seems beautiful to me. I do understand your argument and tend to agree, I would like to see a syntax error if there is anything between the multiple lines of implementation.
- garmaine 9y agoThere would be
- stingraycharles 9y agoI think this is exactly the same as Haskell. As a matter of fact, I had to actually search their Wiki for the first example that was different from Haskell I think it’s just a matter of familiarity. Once you learn how it works, it’s actually extremely elegant and in no way “disconnected.”
- ggm 9y agoI have struggled with FP for many years. What I try and do, is approach these concepts with an open mind and I look for ways of 'saying' what I see which I then rehearse with my FP friends and stick to the one which does not make them wince when I say it. So this says three true things we know about this 'fac' Firstly it says it takes an int and it returns an int. Secondly that if the int it takes is specifically zero then the int it returns is specifically one. Thirdly and lastly, for all other ints it returns that int, times (in the arithmetic sense) a recursive call to itself of the int one less. I worry about why it doesn't have to say abs(n) but then I remember two negatives multiplied together are positive.
- ggm 9y agoShould it have been called Kleene? Is this like Dennis Ritchie and creat() ?
- abecedarius 9y agoFun idea, but note that Kleene is not pronounced the same as ‘clean’.
- frou_dh 9y agoThe great man Ken Thompson gets short-changed by the mindshare of "K&R"
- sparaker 9y agoFor a language that is named "clean", the documentation page is utterly unclean and cluttered.
- bsimpson 9y agoIf you're going to be introducing a programming language, you should have an example function on the home page.
- cbcoutinho 9y agoFor anyone in the Netherlands: There is a functional programming day being hosted by the Dutch Tax Authority on Jan 5th, and today is the last day to sign up! Check out the original link to see more details
- johnbender 9y agoIt's kind of a bummer to me that the one of the top comments here is about the syntax. I get that people have syntax preferences and that there's a certain level of "sniff" test that goes along with these things, but as a fan of programming languages I am always interested in the semantics. That is, I'm interested in what's different about this language and its combination of features and goals: http://clean.cs.ru.nl/Language_features http://clean.cs.ru.nl/Language_features > The uniqueness typing system of Clean makes it possible to develop efficient applications. In particular, it allows a refined control over the single-threaded use of objects which can influence the time and space behavior of programs. Uniqueness typing can also be used to incorporate destructive updates of objects within a pure functional framework. It allows destructive transformation of state information and enables efficient interfacing to the nonfunctional world (to C but also to I/O systems like X-Windows) offering direct access to file systems and operating systems. When I read that I think, "Wow! That seems really neat and reminds me of linear types, and I should check this out". Maybe that's just me though. It's also worth noting that the features page does not mention the word syntax. That's not a deep insight or strong evidence for anything really but it suggests that the designer was interested in the semantics too and that the syntax was a secondary concern.
- joe_the_user 9y ago"It's kind of a bummer to me that the one of the top comments here is about the syntax. "I get that people have syntax preferences and that there's a certain level of "sniff" test that goes along with these things, but as a fan of programming languages I am always interested in the semantics." Well, as the syntax commenter, perhaps I'm a bit defensive but I feel like syntax is inherently an important part of what makes a language appealing - features aren't enough. To take it further, I'm pretty sure if you only absolutely only wanted features for manipulating things, you could find those features in some C++ or Java library. Just the Boost library is vast beyond my ability to encompass it but I'd prefer not to be manipulating hundred-line spews of angle-brackets and stuff. And I, too, like programming language and I feel what makes a language as such cool/useful/etc is that you express a computer's action in a compact, elegant and clear fashion for one's fellow human beings. I remember Steve McConnell said something like "the compiler only has to read source code once but your fellow programmers will need to read it thousands of times". ...it suggests that the designer was interested in the semantics too and that the syntax was a secondary concern Well, the problem is semantics is part of the user experience regardless of the developers intent. If anything, whenever X is important but X is not a concern of the developers, the chances of X biting you go up, not down.