Coffeehouse Thread

60 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Hey Beer, Linux Message Getting Through

Back to Forum: Coffeehouse
  • User profile image
    Minh

    There's finally a tutorial site on converting your Windows PC to a Linux one. People are listening.

    http://www.olene.net/linux.html

  • User profile image
    Sampy

    Beer28 wrote:
    3. case sensitivity is a good thing, which is why C# is case sensitive, while vb, for less experienced users isn't


    Wow.

    I mean I usually disagree with pretty much everything you write but this is pretty low. But it's good to know that I'm not actually a real programmer because in my language Text is different than text.

    I don't really know what to say to this other than "no".

  • User profile image
    AerosSaga

    They both use the same CLR you are an idiot my friend, stick to linux

  • User profile image
    Sven Groot

    That's rediculous. Any programmer that differentiates two identifiers purely by their case should be shot. Even in languages that do support case I never, ever do that. I also don't support it when people use PropertyName for a property and then propertyName for the associated field. It just doesn't show up at first glance.

    I have never, ever needed case sensitivity. However, I have had compiler errors more than once because I forgot that for some reason Hashtable has no capital T. Case sensitivity is useless.

    I also don't agree VB is for "less experienced developers". It's for RAD, and very good at that. It has nothing to do with experience level.

  • User profile image
    Sven Groot

    If you have a situation where case is the only way to avoid a namespace collision, you seriously need to rethink your design. 

  • User profile image
    Sampy

    Beer28 wrote:
    AerosSaga wrote: They both use the same CLR you are an idiot my friend, stick to linux


    You easily forget that visual basic is several years older than the CLR.

    VB5 that i used to code with was a cut&paste language where you would pick out various pre-made components, most coded with C++ wrapped in COM, and simply string them together in some meaningful way with the tk like vb language.

    vb probably comes out of stuff like qbasic for dos and basic, it's history is of a hobby language for hobbyists that wanted to make stuff on their PC, but didn't want to invest the time to learn harder more capable languages.

    That's just how it is. I'm sorry if that's a shock to some of you. I used to code basic back in the 80's and VB in the mid 90's and I just accept that. That's where the language and it's constructs come from.


    While we can disagree on the roots of it, VB .Net is not a "cut and paste" language but a fully featured, powerful first-class programming language. It is suitable for advanced and begining users alike.

    While I'm sure you weren't trying to make this point earlier, I just figured I'd get us all back on the same page.

  • User profile image
    gman

    Sven Groot wrote:
    I also don't support it when people use PropertyName for a property and then propertyName for the associated field.


    Um, OK so you "dont support" the widely accepted industry standard. How do you name your fields and properties then?

  • User profile image
    gman

    oops, double post, sorry

  • User profile image
    gman

    nevermind

  • User profile image
    Sampy

    Private m_someString as String

    Public Property SomeString() As String
       Get
          Return m_someString
       End Get
       Set(ByVal value As String)
          m_someString = value
       End Set
    End Property

    Much harder to make a mistake this way. And you can use m_ + Intellisense to see all your members.

  • User profile image
    AerosSaga

    VB.NET and Old School VB are entirely different languages, you only show your ignorence further my firiend. Do you not understand the difference in the  .NET CLR & COM or what? Obviously not.

  • User profile image
    Marsella

    Similar to what I would use

    private string _myStr;

    public string MyStr
    {
       get {return _myStr;}
       set {_myStr = value;}
    }

  • User profile image
    Sven Groot

    I use Marsella's method in C#, Sampy's method in C++, and in VB I use mMemberName.

    ...

    Maybe I should try finding a style that works for all languages... Wink

  • User profile image
    AndyC

    Beer28 wrote:

    3. case sensitivity is a good thing, which is why C# is case sensitive, while vb, for less experienced users isn't


    No. C# is case sensitive because C/C++ were and it's aimed at developers from those backgrounds.

    C was only case sensitive because it made compilers quicker and easier.

    There is no real excuse for it in a modern filesystem either, it lingers on *nix boxes for legacy reasons (although notably Mac OS X has a case-insensitive filesystem)


    BTW, that link is *so* funny. Smiley

  • User profile image
    geekling

    Minh wrote:
    There's finally a tutorial site on converting your Windows PC to a Linux one. People are listening.

    http://www.olene.net/linux.html


    That was hiliarious and made my day. I love you, Minh.

    @Case sensativity:

    I don't want to maintain anyone's code where the only difference between private variables and public properties is case. ;(

  • User profile image
    ZippyV

    Sampy wrote:
    Private m_someString as String

    Public Property SomeString() As String
       Get
          Return m_someString
       End Get
       Set(ByVal value As String)
          m_someString = value
       End Set
    End Property


    I got a question about that code: If you need to change the value of that variable in the same class (so you can choose between both), which one should you change? The private variable or the public property?

  • User profile image
    Marsella

    The public property, as the property might have some pre/post set/get code to process. It is also important in inheritance but I cant quite remember why atm. 

  • User profile image
    Sampy

    The property.

    Of course, I would never write code like this. If I had an object, say an employee, who had data that described it I wouldn't write this:

    Public Class Employee
       Public Property FirstName() As String
       Public Property LastName() As String
       ...
    End Class

    I'd use a description object:

    Public Class Employee
       Public ReadOnly Property Description() As Description
    End Class

    Where Description would look something like:

    Public Class Description
       Inherits DictionaryBase(Of String, Object)
       ' Add some events in here to detect state change

    End Class

    But that's just me Smiley

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.