Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

ljw1004

@ljw1004
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I have fallen in disgrace, I am programming in VB.NET
    L ljw1004

    If anyone asks, tell them you're using VB.Net because you wanted a language with iterator lambdas, and C# doesn't support them...

    Function Range(min As Integer, max As Integer) As IEnumerable(Of Integer)
    If min>max Then Throw New RangeException()
    Return Iterator Function()
    For i = min To max
    Yield i
    Next
    End Function()
    End Function

    The Lounge csharp

  • Why is VB being forsaken?
    L ljw1004

    Dim i As Integer
    Dim x As String
    i = 0
    x = "0"
    If i = x Then
    End If

    In languages like Javascript and Python, this works fine. Obviously it depends on whether x was initialized to a string like "0" which can be converted to an integer, or one like "foo" which can't. In C# it never works. In VB you get the best of both worlds -- you can chose to code in a Python-like fashion (Option Strict Off), or in a C# fashion (Option Strict On), or you can make it merely give warnings for things like this which may or may not work (Option Strict Custom). It depends very much on the kind of programming you want to do. We try to avoid dogma here, and instead go on the results of extensive user studies. -- Lucian Wischik, VB language PM

    The Lounge csharp learning c++ dotnet

  • Why is VB being forsaken?
    L ljw1004

    I'm Lucian Wischik, the VB language PM at Microsoft. Since VS2010 we've put a huge amount of resources behind VB. We haven't announced all the new features, but here are just some of the new VB features we've already announced: * Async programming, developed absolutely equally with C#. * Iterators, like C#, but also allowing lambda iterators and yield inside try blocks which C# doesn't have. * VBCore - removes the dependency on Microsoft.VisualBasic.dll, so VB is as easy for 3rd-parties to use as C#. * New platforms - VB support added to Windows Phone 7, to the Micro Framework (i.e. Netduino), to XNA. * (and smaller fixes, like no longer prettylisting that blasted "ByVal" in front of everything, and emitting minimally-qualified names) And of course all of these features benefit from the things we know and love about VB, like QuickFixes and XML. Here's an interesting code snippet which ties together several unique VB features at the same time:

    Sub Main()
    Dim xml =

          <%= Iterator Function()
                For Each robot In {"alpha", "beta", "gamma"}
                  Yield *   Robot <%= robot %> reporting in for duty
                Next
              End Function()
           %>
    

    Console.WriteLine(xml)
    End Sub

    What this shows is code that on the surface looks similar in structure to ASP/PHP, but is actually fully typesafe. Personally, I've switched over all my hobby web-services from python to this kind of VB because I can code them quicker and with fewer bugs thanks to the type safety. -- Lucian Wischik, VB language PM

    The Lounge csharp learning c++ dotnet
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups