Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 22nd, 2006, 4:09 PM   #11
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
Here is what I mean about the templates and regular expressions. Take a look at the code below:
c Syntax (Toggle Plain Text)
  1. // Our regex "[a-z]*\s*\w*"
  2. // In D
  3. auto exp = &regexMatch!(r"[a-z]*\s*\w*");
  4. writefln("matches: %s", exp("hello world"));
  5. // In C++ with Boost and Xpressive
  6. sregex = *range('a','z') >> *_s >> *_w
This shows another cool but simple feature of D, raw strings. Just like python. It is important to note that both are based on templates and the regular expression is compiled at compile time. D's templates just seem better the C++, I am still geting used to the !() rather the <> in C++.
Game_Ender is offline   Reply With Quote
Old Jul 22nd, 2006, 5:41 PM   #12
Baphomet
Retired Programmer
 
Baphomet's Avatar
 
Join Date: Jul 2006
Posts: 45
Rep Power: 0 Baphomet is on a distinguished road
Quote:
There is a language exactly like C++. It's called "C++".

What's the use in saying "I want to use a language like some other language X"? Just use X.
I learn a few more languages(I only know about 4 or 5)... But most of them don't offer what I need. C++ is the most useful. I just don't want only be experienced in only two or three langauges (I know GoldBasic, Assembler, C/C++,Qbasic, and JavaScript; I'm only know the first three really well)
Baphomet is offline   Reply With Quote
Old Jul 22nd, 2006, 6:52 PM   #13
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
Baphomet- If you want to learn another language, learning one that's radically different from the ones you know would be more educational/useful than learning one as similar as D is to C++. Try a language like Python or Ruby- they are both very different from languages you know.
__________________
:wq
Silvanus is offline   Reply With Quote
Old Jul 22nd, 2006, 7:24 PM   #14
mikaoj
Programmer
 
mikaoj's Avatar
 
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0 mikaoj is an unknown quantity at this point
Crap, I need to install GCC at new to get GDC working, so I may get an older GCC
__________________
Heh.
mikaoj is offline   Reply With Quote
Old Jul 22nd, 2006, 8:13 PM   #15
Baphomet
Retired Programmer
 
Baphomet's Avatar
 
Join Date: Jul 2006
Posts: 45
Rep Power: 0 Baphomet is on a distinguished road
Quote:
Baphomet- If you want to learn another language, learning one that's radically different from the ones you know would be more educational/useful than learning one as similar as D is to C++. Try a language like Python or Ruby- they are both very different from languages you know.

Quite honestly, I thought about learning those two. Are they compiled languages? I never got a straight answer when I did research.
Baphomet is offline   Reply With Quote
Old Jul 22nd, 2006, 8:21 PM   #16
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by Baphomet
Quite honestly, I thought about learning those two. Are they compiled languages? I never got a straight answer when I did research.
Ruby is interpreted. It's parsed, converted into an abstract syntax tree (AST) and then executed. This makes it rather slow.

Python is compiled at runtime into platform independant bytecode. The bytecode for external modules is cached to allow for faster startup times. Python is typically several times faster than Ruby, but still quite a bit slower than Java and C++.

That said, modern processors have so much power these days that one usually doesn't need the efficiency of C or C++. And when one does, both Python and Ruby make it easy to integrate C/C++ routines in when you need that sort of power.

Both Python and Ruby are rather different from C++. Much more so than D, at least.
Arevos is offline   Reply With Quote
Old Jul 22nd, 2006, 8:25 PM   #17
Baphomet
Retired Programmer
 
Baphomet's Avatar
 
Join Date: Jul 2006
Posts: 45
Rep Power: 0 Baphomet is on a distinguished road
I don't want to learn an interpreted language for application development. Unless, I;m mking a web program or something.
Baphomet is offline   Reply With Quote
Old Jul 22nd, 2006, 8:33 PM   #18
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
I don't want to learn an interpreted language for application development
Why not? Is your career in embedded systems always running on the bleeding edge? Are your opinions sustainable by rational research and evaluation, or have you just 'heard stuff'??
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 22nd, 2006, 8:47 PM   #19
Baphomet
Retired Programmer
 
Baphomet's Avatar
 
Join Date: Jul 2006
Posts: 45
Rep Power: 0 Baphomet is on a distinguished road
Quote:
Why not? Is your career in embedded systems always running on the bleeding edge? Are your opinions sustainable by rational research and evaluation, or have you just 'heard stuff'??

It's because of my clients. At this point I need to be as efficient as possible with whatever language I use. My clients all have Windows. My clients also have old PCs without much memory, hd space, or processor speed. If my clients had faster machines I'd switch. Simple as that.
Baphomet is offline   Reply With Quote
Old Jul 23rd, 2006, 12:47 AM   #20
mikaoj
Programmer
 
mikaoj's Avatar
 
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0 mikaoj is an unknown quantity at this point
I think this regular expression template stuff in D looks really cool.
__________________
Heh.
mikaoj is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The C programming Language (2nd Edition) nnxion Book Reviews 10 Jul 6th, 2007 4:29 PM
Which Programming Language for Beginner ? nkanthikiran Other Programming Languages 18 Jan 21st, 2006 6:53 PM
Best Programming Language to Use? gfunk999 C++ 22 Aug 2nd, 2005 12:59 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC