Re:The original source code of Microsoft GW-BASIC from 1983
by vidarh on Friday May 22, 2020 @04:17AM
(#23269774)
More than luxuriant. Commodore BASIC (effectively 6502 Microsoft BASIC under license with tweaks) on the C64 only looked at the first two characters of variable names. It allowed them to be longer (don't remember how long), but would ignore subsequent letters.
[ Parent
| on HN ]
Re:The original source code of Microsoft GW-BASIC from 1983
by guenthert on Friday May 22, 2020 @12:09PM
(#23273603)
This is getting off-track, but while the pitfalls of two relevant characters out of potentially many are obvious and only excusable due to technical limitation of the platform, insisting on more than 40 relevant characters is likewise contraproductive. Who (which human) will readily distinguish two character strings more than 40 characters in length sharing the first 40?
I feel often the need to remind programmers, that they don't write code for the computer. The computer will make it obvious, whether it understands you or not. You write for the poor sod tasked to maintain your code three years from now, when you're at your next gig.
Re:The original source code of Microsoft GW-BASIC from 1983
by panzagl on Friday May 22, 2020 @01:20PM
(#23274553)
Does namespacing count? com.mycompany.class.classfactory.factory.initializer.StaticGlobal
Sure you can usually use import/aliasing to narrow it, but sometimes you just need to grab some random global from somewhere.