Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

Bent Rasmussen exoteric stuck in a loop, for a while
  • Mads Torgersen @ NDC London : The Future of C#

    @Sven Groot: Right, in that case one would need something like Option<T> because C# wasn't designed from the outset with nullability as an orthogonal concept.

  • Mads Torgersen @ NDC London : The Future of C#

    *cough* topic *cough*

    What do you guys think about the proposal to declare local variables as part of expressions?

    int.TryParse("123", out int x);

    I find this excruciatingly ugly - but understand the desire for compactness. But then why not solve this at the API-level with nullable primitive types?

    var x = int.ParseNullable("123"); // x : int?

    Or

    var x = int.ParseNullable("123") ?? 0; // x : int

    I guess if you have to interact with lots of methods that use "multiple return values" through out parameters rather than tuples or other structures then this saves you pain.

  • Mads Torgersen @ NDC London : The Future of C#

    Most of this stuff appears to be minor syntactic sugar - nothing major like async/await. I think Lucian once spoke about async methods returning multiple values. Perhaps something a la this:

    http://hendryluk.wordpress.com/2012/02/28/reactive-extensions-and-asyncawait/

  • Visual programming language vs text based programming language

    @Richard.Hein:

    , Richard.Hein wrote

    @Jason818: Text based languages are visual ... but I digress into philosophical ideas. 

    Agreed (except they don't need to be).

    @Richard.Hein:

    , Richard.Hein wrote

    @Jason818: Text is more concise, usually, than visual languages because they are symbolic of some mental concept and if you have to draw a rectangle or something to define boundaries,that ends up being extra noise with no syntactical or semantic meaning, and instead, some label on that shape is what is actually important.

    Intentional Software has an DSL editor where one can switch between textual and visual presentations and forms of interaction. Some notations are also more suited for some domains and are semi-visual.

    Mathematica also comes to mind.

    If you have to care much about "drawing" or "defining boundaries" then the implementation is not smart enough. You should only have to care about three things: instantiation (via e.g. drag and drop), connecting (via e.g. drag and drop) and perhaps commenting (via e.g. typing or talking). Graph layout perhaps guided by a logic engine with some domain understanding could help with automatically arranging objects in a pleasing and sensible way. [Easier written than implemented, of course.]

    However visual programming is perhaps best used at a coarse-grained level in the form of workflows. Workflows are programs and they are presented in diagram form. They have sequences, branches, repetitions, events, etc.

    So many programmers already use "visual programming".

  • Photosynth V3

    , Vaccano wrote

    As a programmer, I think that is fantastically cool.

    As a consumer, I wonder how it is better than just taking a video?

    Now all you need is to convince the people taking the snapshots to take the video of the path you'd like to travel (and all other people would like to travel). That should be easy!

  • Mads Torgersen @ NDC London : The Future of C#

    , ScanIAm wrote

    What are static type using statements and what purpose do they serve?

    In Java you can do a static import, this, as far as I remember, allows you write e.g. sqrt instead of Math.sqrt.

  • Mads Torgersen @ NDC London : The Future of C#

    @wkempf: Of course not. As long as there are nullable types this operator makes sense. It makes sense on optional values too, I think.

  • Mads Torgersen @ NDC London : The Future of C#

    , wkempf wrote

    Wish I could see the talk. This bit I found confusing from the slide without explanation:

    1
    public class Point(intx, inty)

    This looks similar to F# constructor syntax Smiley

    http://msdn.microsoft.com/en-us/library/dd233192.aspx

    , wkempf wrote

    The "maybe operator" ( ?. ) would be a very welcome addition.

    Wasn't this null-safe operator part of Cω? It looks very useful indeed. In F# it's less of an issue because types have to be declared as nullable - except for all other "foreign" types that are also nullable.

  • Erik Meijer: Microsoft completely messed it up (with .NET)

    , felix9 wrote

    well, are you guys sure Erik was not joking ?

    I think people read too much into this. Erik is a compiler hacker and probably enjoys abusing certain features creatively in some cases. But can't speak for him of course.

  • Erik Meijer: Microsoft completely messed it up (with .NET)

    , Bass wrote

    *snip*

    Really exceptions/etc. are all just a type of syntax for the more fundamental maybe construct explicitly found in some purely functional languages. Using something derived from maybe is the only way I can see to implement something like IEnumerable without introducing the side effects in question.

    Nitpick: Maybe has nothing to do with purely functional languages per se. C# has the Nullable type (albeit limited to value types; because reference types are unfortunately always nullable in C#) whereas F#, SML and others have a more generalized option type (which has a nice synergy with default non-nullable reference types in F#).

    Also, I wouldn't say Maybe/option is a good way to model exceptions. Because either you get a value or you don't - but then you don't know why you didn't get one! No, in general discriminated unions could be used instead - but that's another story.