Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions

Submissions

comment 10y ago · link · parent

While personally I would prefer a functional approach, I take your point that a much more restrictive imperative setting would also be considerably better.

comment 10y ago · link · parent

I've tried to explain my position briefly above in an edit.

comment 10y ago · link · parent

Modelling financial contracts in an imperative event-driven paradigm just seems like an accident waiting to happen.

EDIT: To the downvoters, if you disagree, I would very much like to understand why, please reply with a comment.

EDIT2: My position is that it is very difficult to reason about correctness and maintain invariants in a highly imperative setting. IMHO, it would be more desirable to use a declarative, or functional language. There are many successful commercial applications of functional programming to financial contracts, e.g. Lexifi, which is based on a subset of OCaml and various in-house solutions developed by banks. Using a functional programming language would also mean the code is far more amenable to formal methods and static verification. One new startup I was very impressed with, aestheticintegration.com, has had success rewriting financial algorithms in a functional programming language in order to prove and verify numerous correctness properties about them. It is a huge shame that folk do not reach straight for the functional programming toolbox when faced with these types of problems.

comment 10y ago · link · parent

This is a great example. I also recall seeing refinement types (Liquid Haskell) used to prove termination of Euclids GCD.

comment 10y ago · link · parent

Yes true, Generics helped a lot (thanks to Odersky and Wadler). But the language does seem to encourage more dynamic frameworks like Spring, that IIRC do perform a lot of casting.

comment 10y ago · link · parent

> Same can be said of static type checking so what is your point?

That isn't true. Static typing offers machine checked proofs of the absence of a whole class of trivial errors; and potentially any invariants you've managed to teach it.

My point was that testing does not negate the need for static types, as implied by the previous poster.

comment 10y ago · link · parent

Unfortunately Java is far from safe, NullPointerException and ClassCastException abound. Which isn't surprising given that Java was originally inspired by ObjectiveC, a mostly dynamic language. Scala has a sort of ML subset which mostly avoids these errors, but unless you need the JVM, why not try OCaml or Haskell?

comment 10y ago · link · parent

Testing shows the presence, not the absence of bugs. Dijkstra (1969).

comment 10y ago · link · parent

Microsoft research have contributed significantly to advancing the state of computing going back to the early 90's. So sounds like you have missed a lot.

comment 10y ago · link · parent

If only it were that simple. Even if we restrict ourselves to open cross platform software, hardware support remains a big issue. I have a Skylake laptop with which I daisy chain two external monitors via displayport. Linux doesn't even support Skylake properly, let alone my dual monitor configuration.

comment 10y ago · link · parent

Well there are more than some iPhone apps, there are many high quality apps. So those unwilling to learn a new language weren't needed after all. Learning the Android API will also be just as hard, probably harder, as learning another curly brace dialect. I wouldn't be surprised if Google replaces Java with Dart at some point anyway.

comment 10y ago · link · parent

IMHO such an argument from Google seems weak. Developers were more than happy to learn a new technology when the iPhone and Cocoa/ObjectiveC came along. And now these same developers all seem really keen on moving to Swift, a whole new programming language, because it offers compelling improvements.

comment 10y ago · link · parent

Because the coffee is not as good quality as the smaller independents.

comment 10y ago · link · parent

Minor nitpick: Haskell has the ST monad for using "imperative idioms internally". There is no need for unsafePerformIO.

comment 10y ago · link · parent

Mirage?

comment 10y ago · link · parent

Are you predicting that the next US fighter after F35 will be powered by Python? Because that's what US institutions like MIT now teach.

comment 10y ago · link · parent

The issue is one of scale. And if by today's tech you mean C++, it also has safety issues that become apparent at scale.

comment 10y ago · link · parent

100% agree.

comment 10y ago · link · parent

The Apollo Guidance computer wasn't anywhere near the scale and complexity of the F35 software. I'm also fairly certain the Apollo mission did not pick their technologies based on "programmer availability".

comment 10y ago · link · parent

It's usually Ada.

comment 10y ago · link · parent

Choosing C++ is certainly a red flag in this context, which is why I pointed it out.

comment 10y ago · link · parent

C++ is not a safe language. Ada has many more safety features. What is very interesting to me and perhaps others is why C++ was chosen, despite being (IMHO) unsuitable for such applications. I am not a language bigot because I would use the right tool for the job. What would you use?

comment 10y ago · link · parent

The software has apparently been written in C++, it all sounds like a bit of a farce. EDIT: to clarify the above comment, the context is the use of C++ and mainstream tools for 8 million lines of safety critical code.

comment 10y ago · link · parent

The paper "Typing Haskell in Haskell" is also very readable and informative.

comment 10y ago · link · parent

Nice summary. It's worth pointing out that Haskell has nearly all of these properties. The Safe Haskell subset is needed to avoid FFI and segfaults.

comment 10y ago · link · parent

You're describing the lower tier jobs in an industry of disposable software. There are software jobs out there that do value experienced and skilled developers.

comment 10y ago · link · parent

I would certainly rather farm worms than take many mainstream tech jobs. There's probably much more freedom to innovate.

comment 10y ago · link · parent

The state of Skylake software support over the last year for both Linux and Windows (with many Linux issues still unresolved) kills any excitement I might have had for future intel products. To be honest, I'd rather have a slower passively cooled ARM chip, at least then my ultrabook wouldn't sound like a jet engine when some background task kicks in (not to mention battery drain consequences).

comment 10y ago · link · parent

It is not easy describing pure functional programming in two sentences. I encourage you to read up on it yourself. Again, IO is not a side-effect in pure languages such as Haskell. And again, the absence of side-effects best defines functional programming, not any particular feature, which imperative languages can and do steal.

comment 10y ago · link · parent

Not in Haskell and other pure languages. Pure functional programming is used to construct larger programs from smaller ones, which only when finally executed by the runtime produce output.
1
6566676869