Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1787
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Ben Pfaff <blp@cs.stanford.edu> |
| Newsgroups | comp.programming |
| Subject | Re: commas |
| Date | Tue, 12 Jun 2012 09:54:54 -0700 |
| Lines | 30 |
| Message-ID | <878vfsh3mp.fsf@blp.benpfaff.org> (permalink) |
| References | <f0d3d247-8eac-4ce0-bb61-296a58ea2035@googlegroups.com> <XaKBr.14619$hJ3.3099@newsfe14.iad> |
| Reply-To | blp@cs.stanford.edu |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| X-Trace | usenet.stanford.edu 1339520097 18887 127.0.0.1 (12 Jun 2012 16:54:57 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
| Cancel-Lock | sha1:LW3fxoC6+GVlZvF3vynqgr3hG08= |
| Xref | csiph.com comp.programming:1787 |
Show key headers only | View raw
Daniel Pitts <newsgroup.nospam@virtualinfinity.net> writes:
> I believe Java 7 has that capability, sort of.
>
> Instead of "," you use "_", but the idea is the same, grouping digits
>
> int x = 5_000_000;
>
> equivalent to
>
> int x = 5000000;
>
> Honestly, I think this should be a function of the editor, and not the
> language itself, but I haven't seen an IDE that abstracts the
> programming language that extensively but remains useful.
Emacs has "glasses" mode, described as:
Glasses minor mode makes `unreadableIdentifiersLikeThis' readable by
altering the way they display. It knows two different ways to do this:
by displaying underscores between a lower-case letter and the following
capital letter, and by emboldening the capital letters. It does not
alter the buffer text, only the way they display, so you can use it
even on read-only buffers. You can use the command `M-x glasses-mode'
to enable or disable the mode in the current buffer; you can also add
`glasses-mode' to the mode hook of the programming language major modes
in which you normally want to use Glasses mode.
I guess that it would be a minor modification to this mode to
make it also display underscores as part of numbers.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
commas bob <bob@coolfone.comze.com> - 2012-06-12 07:09 -0700
Re: commas Robert Wessel <robertwessel2@yahoo.com> - 2012-06-12 09:16 -0500
Re: commas BGB <cr88192@hotmail.com> - 2012-06-12 09:53 -0500
Re: commas "BartC" <bc@freeuk.com> - 2012-06-12 16:33 +0100
Re: commas Paul Herber <paul@pherber.com> - 2012-06-12 15:37 +0100
Re: commas Rui Maciel <rui.maciel@gmail.com> - 2012-06-12 16:14 +0100
Re: commas "BartC" <bc@freeuk.com> - 2012-06-12 16:37 +0100
Re: commas Rui Maciel <rui.maciel@gmail.com> - 2012-06-12 17:10 +0100
Re: commas Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-12 09:32 -0700
Re: commas Ben Pfaff <blp@cs.stanford.edu> - 2012-06-12 09:54 -0700
Re: commas "BartC" <bc@freeuk.com> - 2012-06-12 18:05 +0100
Re: commas Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-12 11:51 -0700
Re: commas "BartC" <bc@freeuk.com> - 2012-06-12 20:36 +0100
Re: commas Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-12 16:28 -0700
Re: commas Thad Smith <ThadSmith@acm.org> - 2012-06-17 22:38 -0600
Re: commas Robert Wessel <robertwessel2@yahoo.com> - 2012-06-18 00:02 -0500
Re: commas blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2012-07-06 19:01 +0000
Re: commas Jongware <jongware@no-spam.plz> - 2012-07-30 15:53 +0200
Re: commas "BartC" <bc@freeuk.com> - 2012-07-30 15:50 +0100
Re: commas "BartC" <bc@freeuk.com> - 2012-08-01 01:56 +0100
Re: commas Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-01 03:31 +0100
Re: commas rossum <rossum48@coldmail.com> - 2012-07-30 19:57 +0100
Re: commas Fritz Wuehler <fritz@spamexpire-201207.rodent.frell.theremailer.net> - 2012-07-30 22:14 +0200
Re: commas Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-30 23:00 +0100
csiph-web