Syntax highlighting for D (nested comments, WYSIWYG strings)

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply

How important is it to you, to have this feature implemented into future versions of TextPad?

5: Important, even if speed/efficiency is decreased/degraded.
4
25%
4: Somewhat important
4
25%
3: I'm okay either way
4
25%
2: Somewhat unimportant
3
19%
1: Unimportant, even if speed and efficiency remain unaffected
1
6%
 
Total votes: 16

smjg
Posts: 30
Joined: Mon Mar 08, 2004 10:34 am
Contact:

Syntax highlighting for D (nested comments, WYSIWYG strings)

Post by smjg »

The D language has a few syntax features not within TextPad's current highlighting capabilities:

1. Nested comments, specifiable for each style of comment separately:
  • /* ... */ - unnestable comment
  • /+ ... +/ - nestable comment
2. Multiple kinds of strings:
  • " ... " - a C-style string that can contain escaped character sequences
  • r" ... " - a WYSIWYG string, i.e. no escapes
  • ` ... ` - alternative notation for WYSIWYG string
It would be nice to see these syntaxes supported in TextPad syntax definitions.
User avatar
BenjiSmith
Posts: 49
Joined: Fri Jan 16, 2004 9:37 pm
Contact:

Post by BenjiSmith »

It's nice to see someone else who has been exposed to the D programming language. I think it's a great language, and I'd definitely like to see support for it increasing.
User avatar
ramonsky
Posts: 88
Joined: Fri Nov 14, 2003 10:54 am

Post by ramonsky »

Just looked at D myself. It looks pretty amazing.

One thing I noticed was that D uses Unicode source files, allows Unicode identifiers and so on. This is a brilliant advancement, as there is no doubt that Unicode is the future. This observation does, however, bring us back to TextPad's poor performance in handling Unicode text. See here.

Ramonsky
Last edited by ramonsky on Wed Sep 22, 2004 11:22 am, edited 1 time in total.
Kniht
Posts: 4
Joined: Wed Sep 22, 2004 4:08 am

Post by Kniht »

C (and C++) has supported Unicode source for decades (literally!). Just encode it as UTF-8 so all the control characters and words (braces, keywords) are as expected. :P
User avatar
ramonsky
Posts: 88
Joined: Fri Nov 14, 2003 10:54 am

Post by ramonsky »

Just to let you know where the competition is at, JEdit can now do syntax highlighting for D, including wysiwyg strings (but not yet nested comments). See this post in the D forum by JEdit's author.

What silly bugger voted this as "unimportant"? :roll:

Ramonsky
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

ramonsky wrote:What silly bugger voted this as "unimportant"?
Probably someone to whom this feature is unimportant ...

Why do you complain?
If the option to vote for "unimportant" is available, there is nothing to be said against using it.
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Re: Syntax highlighting for D (nested comments, WYSIWYG stri

Post by talleyrand »

smjg wrote: 2. Multiple kinds of strings:
  • " ... " - a C-style string that can contain escaped character sequences
  • r" ... " - a WYSIWYG string, i.e. no escapes
  • ` ... ` - alternative notation for WYSIWYG string
It would be nice to see these syntaxes supported in TextPad syntax definitions.
I don't think this would be a tough one to implement for Helios. It already has the ability to support Python's string quoting (single or double quote works just as well) which boils down to the above except they do WYSIWYG strings as triple quoted thus '''my big fat string with a line break (imagine it) and more text here'''
I choose to fight with a sack of angry cats.
Post Reply