nav search
Data Center Software Security Transformation DevOps Business Personal Tech Science Emergent Tech Bootnotes BOFH

back to article
F# earns Syme top Royal Academy of Engineering award

Silver badge

Bug free?

"Syme’s F# is a cross-platform, open-source language that is remarkably bug-free"

Is that supposed to be a sarcastic comment on the quality of MS languages, open source languages, Don Symes ability to write bug free code, or does the author just assume that all compilers are bug ridden disasters and we should just be grateful that they work at all?

On a side note , has F# really set the world alight? Functional languages have been around for decades and are still niche so I think its fair to say they're going to remain niche for the forseable future. IMO they're a nice idea in theory but in practice highly recursive code is an absolute pain to debug. Its fine it its confined to a few functions or code paths, but if the entire program is recursive from the ground up due to the language type used then no thanks, I'll steer clear.

2
4

Re: Bug free?

The comment is probably around that functional languages favor functional purity and referential transparency, which generally make for bug free code in addition F# provides a number of tools to ensure issues around null are highlighted as well as adding to a discriminated union creates warnings where cases are not covered.

Sure none of this means you will be bug free and anyone can screw up the simplest of things but it does make falling in to the pit of success easier than the jaws of failure.

I agree that F# is still not mainstream yet however its on the rise going from 69th to 12th on Tiobe

http://www.infoworld.com/article/2610183/microsoft-net/article.html

Congratulations Don

7
0
Silver badge
Holmes

It's time for Haskell...

IMO they're a nice idea in theory but in practice highly recursive code is an absolute pain to debug. Its fine it its confined to a few functions or code paths, but if the entire program is recursive from the ground up due to the language type used then no thanks, I'll steer clear.

Please explain why you think recursive code is a "pain to debug" if you don't even use said languages. Why would you even want to "debug"? Aren't you writing test code?

You may also want to explain what you mean by "recursive from the ground up". Missing the point, are you?

Furthermore someone considering functional programming "niche" must be talking from behind a stack of fanfold paper illuminated by an IBM 80-column terminal. Enjoy your conservatism. Maybe you will bum your code to use less than 20KByte eventually.

People are still faffing around with mutable state in 2015? I blame crap university courses from profs who should be taken out to pasture, retarded management in industry and a "hot shot with C++" culture of the maximum stupid. The wreckage is all around us to admire.

4
7
Anonymous Coward

Re: It's time for Haskell...

"People are still faffing around with mutable state in 2015? I blame crap university courses from profs who should be taken out to pasture, retarded management in industry and a "hot shot with C++" culture of the maximum stupid. The wreckage is all around us to admire."

Now that's what I call extremely targeted blame pointing.

The Internet is plastered with posts from the "hot shot with C++" types. They don't like managed code, exceptions, and a whole lot of other things. An old cynic like me might conclude that there are different personality types who had different education and training and they have different prejudices. But it's certainly true that programming does seem to attract people who have very ....definite... views on how things should be. Meanwhile, the industry at large is usually overbudget, underdelivered and late.

3
0
Silver badge

Re: It's time for Haskell...

"Please explain why you think recursive code is a "pain to debug""

If you have to ask the question then you won't understand the answer.

"Why would you even want to "debug"? Aren't you writing test code?"

Thats the sort of comment I'd expect to hear from a 10 year old just starting out in programming.

"You may also want to explain what you mean by "recursive from the ground up". Missing the point, are you?"

No, but perhaps you are wrt functional languages. Perhaps you don't understand what recursive means.

"Furthermore someone considering functional programming "niche" must be talking from behind a stack of fanfold paper illuminated by an IBM 80-column terminal."

Uh huh. Meanwhile back in the real world....

"Maybe you will bum your code to use less than 20KByte eventually."

Oh dear. Been looking at the size of some p-code files have we? Its very easy to create a small target executable when all the libraries and heavy lifting is done inside the VM.

"People are still faffing around with mutable state in 2015? I blame crap university courses from profs who should be taken out to pasture"

Shame those same people "faffing around" are probably the sort who wrote your Haskell compiler in C with some assembler thrown in. But what do those idiots know eh? They should have written it in ML, right?

"The wreckage is all around us to admire."

The only wreckage I can see is the burnt out remains of the "functional programming is the next great step in development" rhetoric that has been spouted by a succession of tedious monomaniacs since the 1970s. Welcome to the club, and while you're at it change the bloody record.

6
4

The in-joke is that the F in F# is for fun.

And it is fun. I've learnt a lot just trying to get my head round F#, though I haven't been keeping up with the latest developments, and unfortunately haven't had occasion to use it professionally recently.

Functional might not be the next big thing, but I'm fairly certain it's one of them.

Congratulations to Don.

5
0
Coat

keyword

"fun" is such an important factor in F# that its a keyword!

I'm quite happy to be a F#'er!

0
0
Silver badge

A quick, unscientific way to assess the popularity of a language* is to see how much demand there is for the skill. JobServe returns 15 jobs requiring F#. Not many, compared with C# (1599), Java (1797), JavaScript (1736) or even Scala (162). This suggests that the opinion of people who actually use programming languages to do stuff isn't quite as enthusiastic as that of the Royal Academy of Engineering.

Cross-platform? Up to a point. F# seems to be tied to Visual Studio**, which I think only runs in Windows, and the output is apparently CLI, JavaScript or GPU code. It's not my area of expertise, but depite Mono, I'm not aware of extensive use of CLI languages on non-MS platforms.

* Or at least to assess whether learning it is a good career move.

** Yes, I know real developers don't use an IDE (or a screen, or a keyboard).

3
2
P_0

Mono runs on desktop linux, Mac, ios and Android. I am not sure how much more extensive they can get. If you've ever played Angry Birds on your phone then you've been using mono. (Or 90 pc of android games)

1
0
Orv
Bronze badge

Where I work researchers use F# running on Linux to do natural language processing research. .NET in general is pretty cross platform if you don't need the GUI bits; bytecode compiled using .NET on Windows will run just fine under Mono on Linux or OS X. We have people using Visual Studio as an IDE to develop code that runs on our Linux-based HTCondor parallel computing cluster. That seems pretty cross-platform to me.

I don't think we'll ever see the next office suite or Guys Shooting Each Other In Graybrownland Game written in F#, but it fills a useful niche in data analysis type work -- as the article implied.

2
0

Cross-platform

"Cross-platform? Up to a point. F# seems to be tied to Visual Studio".

I use Emacs for F# programming. Also, MS is releasing an open-source, cut-down version of Visual Studio for Linux and MacOS, so even if you want an IDE, you are not tied to Windows.

My main gripe with F# is that they based on O'Caml instead of Standard ML. This makes the syntax (especially for pattern-matching) a bit clumsy in places. But, overall, F# is a big improvement over C#, Java, C++ and a host of other mainstream languages. If Apple's Swift is made truly cross-platform, it may rival F#, though.

0
0

Re: Cross-platform

My main gripe with F# is that they based on O'Caml instead of Standard ML. This makes the syntax (especially for pattern-matching) a bit clumsy in places.

Just "OCaml", with no apostrophe. It's French, not Irish.

Personally, I don't much care for the syntax of Standard ML or OCaml, though I enjoy working in both languages. I think F# improved on both of them a bit, but still suffers from the "use random combinations of punctuation characters for operators" tendency of the ML family. Haskell (largely descended from Miranda, which in turn incorporated ideas and syntax from ML and other languages) is somewhat better; the Haskell committee didn't have such an aversion to using actual words.

0
0
P_0

F# is fun. And powerful. At work we are moving some C# code to F# libraries because we can rewrite the code more cleanly and succinctly im F#.

2
0

Out of curiosity, is there a business benefit or are you doing it on your own time?

</snark>

0
0
Anonymous Coward

"Out of curiosity, is there a business benefit or are you doing it on your own time?"

That's a manager remark. To a developer or an architect, being able to rewrite complex code in a cleaner and more maintainable way increases its value due to costs that won't be incurred in future.

0
0

Re: "Out of curiosity, is there a business benefit or are you doing it on your own time?"

I'm a developer, not a manager.

What you say is not universally true. It's only true if the costs of a rewrite are lower than the projected savings and if those savings actually materialise, which they frequently fail to do.

Furthermore, there's an opportunity cost - all the time you're re-writing the existing system, you're not building value.

0
0

Re: "Out of curiosity, is there a business benefit or are you doing it on your own time?"

It's only true if the costs of a rewrite are lower than the projected savings and if those savings actually materialise, which they frequently fail to do.

Furthermore, there's an opportunity cost - all the time you're re-writing the existing system, you're not building value.

Research suggests that in general, for commercial software systems, maintenance of existing code averages around 80% of development costs; and reading existing code up to 40%. A rewrite to significantly clearer source isn't hard to justify under those conditions.

And such a rewrite will usually find and fix bugs (assuming you are, in fact, rewriting to a more-readable language) and resolve technical debt, so you are "building value", by producing a more-robust product.

1
0

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

The Register - Independent news and views for the tech community. Part of Situation Publishing