🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #86

Re: Optimization by programmers

#86
From: David Brown
Date: Tue, 13 Oct 2026 17:50
36 lines
2896 bytes
On 13/10/2026 19:02, Niklas Holsti wrote:
> On 2026-10-13 19:09, Andy Valencia wrote:
>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>> hex \ change to base #16
>>> add \ is this a dictionary word, or a number?
>>>
>>> The classic ways to avoid this has been to
>>>
>>> 1) prefix hex numbers with 0 if they would otherwise start with a
>>>     letter.  Dictionary words rarely start with digits, and when they
>>>     do, they don't conflict with hex numbers.
>>
>> Alternately, Forth could adopt practices which have become broad,
>> de facto standards.  So, referencing above, instead hex numbers
>> have a 0xadd prefix, and you don't switch the base of the system.

0x prefixes for hex is certainly common, but $ prefixes for hex have 
been around for a long time too and are used in Pascal.  Some languages 
use a suffix, like 0addH.  Ada has 16#add#, while VHDL has x"add".  Some 
BASICs use &.  So again, there are plenty of options from existing practice.

>>
>> While you're at it, start the transition to "//" as the comment
>> token.  From memory, who's holding out?  Only Forth, Smalltalk, and
>> COBOL come to mind.
> 
> Ada uses "--".
> 

As does Lua, VHDL, Haskell, and SQL.  And lots of languages use #, TeX 
has %, several languages use ; and there are many others.

<https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Comments>


Technical Details
Message-ID: <11alr1n$ophm$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me> <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <179190779286.25645.14465927900754526737@media.vsta.org> <nj76h5FnesuU2@mid.individual.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.arch
Subject: Re: Optimization by programmers
Date: Tue, 13 Oct 2026 19:50:47 +0200
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <11alr1n$ophm$1@dont-email.me>
References: <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me>
 <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me>
 <11aiqc0$3kr94$3@dont-email.me>
 <179190779286.25645.14465927900754526737@media.vsta.org>
 <nj76h5FnesuU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Oct 2026 17:50:50 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="812598"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19XfV9behPrYQxX5PuGDsPqZ8cr9A4HifA="; posting-host="0453d936fb977b9ac4728f0f8db2cabc"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:YXMpaFXvn7moZf3HBSLyUVPPK6g= sha256:qYpTRHRCoHdxXXjc3iOB/eC48Q7CbbiGBIY4MWDfCwE=
	sha1:zY1O0KshZVTsrrQn4m6fRCvSvBg= sha256:O3/OKn6A8LTPjrtPM+9s/3YMkHbVrD1EznCJuu0e0WU=
In-Reply-To: <nj76h5FnesuU2@mid.individual.net>
Content-Language: en-GB