Home > MATLAB, R > supercalifragilisticexpialidocious = 1

supercalifragilisticexpialidocious = 1

I notice that the latest version of R has upped the maximum length of variable names from 256 characters to a whopping 10 000! (See ?name.) It makes the 63 character limit in MATLAB look rather pitiful by comparison. Come on MathWorks! Let’s have the ability to be stupidly verbose in our variable naming!

About these ads
  1. IzRey
    21st April, 2011 at 14:23 pm

    How about:

    Lopado­temacho­selacho­galeo­kranio­leipsano­drim­hypo­trimmato­silphio­parao­melito­ypho­phatto­perister­alektryon­opte­kephallio­kigklo­peleio­lagoio­siraio­baphe­tragano­pterygon = 1
    :)

    Thanks to Wikipedia. This is the second longest english word. The longest word is too long to post here (~189,000 characters go look: http://en.wikipedia.org/wiki/Longest_word_in_English).

    Seriously though, this is great. although 10,000 characters seems a bit superfluous it is just their way of saying: no reasonable limit on the length of variable names.

    I am not a person who uses extremely long variable names. In fact I didn’t ever find out that MATLAB has a 63 character limit.

    • 26th April, 2011 at 23:04 pm

      Wow! I had no idea that there was a word that long.

      Agreed that 10 000 seems a bit arbitrary; I guess that a finite limit has to be chosen to stop you accidentally programmatically generating a variable name of infinite length and crashing your machine.

      I full recommend giving verbose variable names a try. The extra typing time is often ofset by less time trying to understand what the variable is for.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 229 other followers

%d bloggers like this: