Earlier quoted context omitted.
But he said type safety, which is entirely compile time and allows you to avoid run time checks, making it faster not slower.
Type safety means well-typed programs can't go wrong. Corrupted memory is surely a case of going wrong, so memory safety is a part of type safety. (In this sense, C, C++, etc. are not type safe.) By the way, it is possible and sometimes preferrable to do all type checks in runtime. Haskell provides this option: https://ghc.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime
A glimpse into a new programming language under development at Microsoft
201–210 of 230 posts
Re: A glimpse into a new programming language under development at Microsoft
#202Re: A glimpse into a new programming language under development at Microsoft
#203Earlier quoted context omitted.
I doubt that C++ is chosen because of raw performance (both C# and Java are close enough), but mostly because of memory and cpu cycle determinism.
Does it have anything to do with history? Given Java relying on JVM and in the beginning JVM's performance probably wasn't so good, game libraries were probably written in C, C++ and then nobody wanted to rewrite game engines because gaming industry is really fast-pace and very very busy.
Re: A glimpse into a new programming language under development at Microsoft
#204Earlier quoted context omitted.
Type safety means well-typed programs can't go wrong. Corrupted memory is surely a case of going wrong, so memory safety is a part of type safety. (In this sense, C, C++, etc. are not type safe.) By the way, it is possible and sometimes preferrable to do all type checks in runtime. Haskell provides this option: https://ghc.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime
Context is cool. With context, you can participate in a conversation, rather than stating an obvious but non-sequitur fact. By definition, type checks are done at compile time. Haskell's defer-type-errors is precisely an example of that. The error is found at compile time, but rather than signal it, the offending code is replaced with an exception.
> By definition, type checks are done at compile time.
That does not match my definition of type checks.
Ignoring things like Typed Racket or clojure.core.typed for a moment. Consider a cast in Java: This is a type safe operation which incurs a runtime type check.
Now maybe you're thinking of global type checking for correctness. In which case, I'd still disagree, since there is no rule that you can't have a resident analyzer and run type checks after compilation. Go read about Typed Racket, for example.
Re: A glimpse into a new programming language under development at Microsoft
#205Earlier quoted context omitted.
> I have been building GUI applications with Java and Swing for some time. I am willing to go on-the-record and state that Swing provides a reliable and thorough cross-platform GUI toolkit. Swing is used by two kinds of people: developers, because the tools that use it are just too good to go elsewhere (IntelliJ etc) and enterprise users that have it forced upon them. I don't think anybody is using Swing willingly --…
It may be over-engineered, but it's easily available, at hand, when you need it. The only cross-platform GUI toolkit that I loved working with and that does a much better job than Swing is Qt. Unfortunately Qt is C++ and it's not even standard C++. So language bindings are hard to build and (compared with Gtk) working with C++/Qt is not so painful. The bindings for Mono are dead. Trolltech released at some point Qt J…
Both statements I agree with!
I think it's a sad state of affairs, that the tens of billion s IT industry, and the whole OSS community, cann't produce, and maintain, a decent, cross platform UI, based on C with hooks for various languages.
GTK has dropped the ball even on Linux (Mac/Windows support is crap, and the library is essentially what it was 10 years ago content wise).
wXWidgets is at the same level more or less.
QT is nice, but is C++, so you either by into the whole thing or you face the not so good support and bindings to other languages (Python has the best support, but even that is mediocre).
Mozilla's XUL was never wrapped and maintained properly (as once promised), to be use to use for cross platform development.
SWT needs Java, and is too tailored to Eclipse's needs.
I, for one, don't need native look in all apps -- I could do with something like the cross platform widget library Adobe built for Lightroom -- that and a webkit view.
Re: A glimpse into a new programming language under development at Microsoft
#206Earlier quoted context omitted.
Yes it does, but IMO only superficially. Rust has a completely different type system model and also Rust is not aimed at high performance applications, while this seems to be. Many(most?) new languages fade away because nobody is interested in implementing compilers/libraries writing documentation/teaching material/etc etc. I'll be impressed if they can ship something next year.
> Rust has a completely different type system model What are the differences? It sounds pretty similar to Rust—"rvalue references, move semantics, destruction, references / borrowing" are straight out of Rust's playbook. Granted, if it's based on C#, it sounds like it'll be more object-oriented than Rust is, which is a difference. Rust has some object-oriented features, but they're much more minimalist than what C# o…
As you mentioned, if they based it entirely on C# , it will be a unified type system. We'll only get more information when they release a standards specification.
>Rust is about zero-cost abstractions, period.
Um.. no? For one, the heap is reference counted - and if you use std::gc its... mark/sweep(not sure?). This obviously means that the programmer has little control over memory allocation other than what can be afforded by not compromising memory safety. Secondly from my initial use of Rust I dont think you cannot protect a chunk of data with a lock and share it (w/o copying) across threads/processes as you would with a systems language like C++.
--
Rust is not aimed at high performance applications - I dont see anything wrong with that statement.
Re: A glimpse into a new programming language under development at Microsoft
#207Earlier quoted context omitted.
You looked at Kotlin? As a C# developer I'm loving the language and it is x-platform. And that's despite my assumed bias, because I work at JetBrains.
kotlin looks cool. But it's missing some minor things that would make it much more friendly: * no regex literals * a little verbose(instead of [] for arrays, it's "Arrays") * hashes IMO should be JSON * why doesn't null evaluate to false? God I hate writing if (a != null). I'm much happier in javascript/ruby/groovy land where if can type "if (!a)" or "unless a" or even cooler "raise Exception("a should not be null")…
Re: A glimpse into a new programming language under development at Microsoft
#208Earlier quoted context omitted.
For the record, top rated comment here, and I do a fair bit of C++ as well as C# and am fully aware of how awesome have proper control over allocations would be. My frustration is that once they've finished, I don't believe it would be any more use than C# in practice. (There's a nice language struggling to get out of C++14.) However, Rust exists and is unlikely to be as encumbered as what Microsoft produces.
Perhaps you are right that I am painting HN with too broad a brush. I do see some good points made scatteringly in this discussion, such as yours. On Rust, and also this project (I believe the following point is mentioned elsewhere in this thread as well): There's one thing I don't get about the whole thing. People who want a low-level language with lots of control have C and C++. People who want a high-level languag…
C's widespread made systems open to buffer and pointer misuse exploits, patched by external tooling and multiple attempts at OS levels. All of them still far away from the desired outcome.
Re: A glimpse into a new programming language under development at Microsoft
#209Earlier quoted context omitted.
> I have been building GUI applications with Java and Swing for some time. I am willing to go on-the-record and state that Swing provides a reliable and thorough cross-platform GUI toolkit. Swing is used by two kinds of people: developers, because the tools that use it are just too good to go elsewhere (IntelliJ etc) and enterprise users that have it forced upon them. I don't think anybody is using Swing willingly --…
>I don't think anybody is using Swing willingly -- or enjoying it. Besides the "uncanny valley" effect to native widgets, it suffered from the start from the main negative of Java's culture: it was overengineered. On top, it underdelivers in many areas. Just out of curiosity, what other gui tool kits have you used that you compare Swing too? I always wonder what gui toolkits those who decry Swing have experience with…
I've used Cocoa, GTK on Linux, and Windows Forms (or whatever .NET v1 and v2 had called) in Windows. Have also used Swing.
Quality of results wise, Cocoa beats them all down, but single platform unfortunately. The .NET solution was also nice, but limited to a single platform too. (I know of, but don't care for small-time hacks to make Cocoa/.NET play on other platforms, only for officially supported projects).
Swing had been a pain in the ass to create UIs with, overengineered, with missing functionality (how long did we have to wait for a HTML control?) and ugly too boot.
Swing has one thing going for it: it does work on all platforms. I just wish it was better designed (API wise), more complete, and less uncanny valey-ish.
Re: A glimpse into a new programming language under development at Microsoft
#210Earlier quoted context omitted.
I think you're missing my point, it's about sweet spots. C# has a sweet spot on windows desktop and ETL style data processing. You could have written all of those things in C++, Java or Python. But the ecosystem isn't there. There's no Hadoop, SciPy, Django or Rails. For crying out loud, just running a less compiler on Windows required someone to sit down and rewrite it from scratch. (The node story has improved on w…
>And none of this looks likely to change. Windows has been a second rate development platform for some time now, and Microsoft don't mind. Says who? Those of us that use GUI environments not stuck in 70's terminals workflow think otherwise.
Nuget is a late attempt to follow Maven and yet still behind.
EntityFramework came in late and I heard ppl moaned.
No Docker...
Chocolatey came in late.
So yeah... Says the parent thread and me.