IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 1 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Guaranteed Code?
MIT Technology Review: Guaranteed Code
Adam Chlipala, an associate professor of computer science at MIT, thinks there’s a better way to write computer programs.

Most programs just list operations that the computer should perform when it receives particular types of data. The programmer has to write tests to determine whether a program does what it’s supposed to, and since it’s virtually impossible to predict all the ways a program might be used, most software has bugs.

Chlipala prefers so-called functional programming. Instead of stringing together imperative commands, a functional programmer defines a set of functions, or mathematical relationships between inputs and outputs. Essentially, functional programming expresses what a program does as a set of equations.
Looking at it superficially, it's a different approach for web development. Anyone use it or look in to it?

Link to (PDF) paper describibg it: Ur/Web: A Simple Model for Programming the Web

[edit] add link to paper
Alex

"There is a cult of ignorance in the United States, and there has always been. The strain of anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

-- Isaac Asimov
Expand Edited by a6l6e6x Nov. 9, 2017, 11:25:53 PM EST
New I'm dubious.
Functional programming is great for some things. But the reason you can mathematically prove it's correct has to do with the lack of side effects in functions. As soon as you put a SQL database in there you lose that property and it's no longer truly provable functional programming.

He talks about two special features, encapsulation and simple concurrency, as if they're some new mind-blowing thing that most web developers have never heard of. Anyone using a modern web development language like ES2015 or Coffeescript, and a library like React, has access to both of those.

So, interesting experiment, but it doesn't seem worth the trouble of dealing with the limited libraries and servers of a niche tool. The toy example in the paper aside, I doubt there's any meaningful productivity boost unless, like the author, you think mainly in functional modes all day long anyway.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New Thanks for your comments, Scott!
I had a feeling it might not be nirvana.
Alex

"There is a cult of ignorance in the United States, and there has always been. The strain of anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

-- Isaac Asimov
New Euh...
encapsulation and simple concurrency, as if they're some new mind-blowing thing that most web developers have never heard of

You'd be amazed... (not limited to web developers either, although PHP code does seem to contain the most eyewatering atrocities committed against any sane coding practice.)
New Functional programming has been around since approximately forever.
AFAICS, all he claims is to have taken it to the Web. Sure, OT1H that might be fine and dandy and just about all-round super-duper...

But OTOH, there are reasons functional programming, despite having been around since approximately forever, hasn't yet taken the programming world as a whole by storm.
--
Christian R. Conrad
Same old username (as above), but now on iki.fi

(Yeah, yeah, it redirects to the same old GMail... But just in case I ever want to change.)
New Bah, that's what I get for having a post hanging around un-posted for 10 hrs: Beaten by Scott.
New :-) It was worth hearing your take on it regardless.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New OK, then here's some more:
OT1H, that whole "No side effects!" thing sounds like it often could be great. But OTOH, perhaps only when you explicitly want just a single value as a result, calculated from whatever inputs.

So what about all the other times, like in real-world application programs, where you actually want all kinds of shit to happen? Like saving stuff to disk, committing a database transaction, opening or closing one or more on-screen windows, etc. Or especially, several of those at once. "Those aren't 'side effects', they're what this is supposed to do!", kind of thing.

Summa summarum: It all feels a little too theoretical.
--
Christian R. Conrad
Same old username (as above), but now on iki.fi

(Yeah, yeah, it redirects to the same old GMail... But just in case I ever want to change.)
     Guaranteed Code? - (a6l6e6x) - (7)
         I'm dubious. - (malraux) - (2)
             Thanks for your comments, Scott! - (a6l6e6x)
             Euh... - (scoenye)
         Functional programming has been around since approximately forever. - (CRConrad) - (3)
             Bah, that's what I get for having a post hanging around un-posted for 10 hrs: Beaten by Scott. -NT - (CRConrad) - (2)
                 :-) It was worth hearing your take on it regardless. -NT - (malraux) - (1)
                     OK, then here's some more: - (CRConrad)

Back off, man! I'm a scientist!
70 ms