So my question is simple ; of the two which would be advisable to learn first.
All the C++ books tell me to learn C++ over C ,but on the internet im told that learning C gives better grasps of concepts.
Which should i learn first and why?
Name:
Anonymous2006-09-01 13:57
>>80
It's no fun if you have to do getHashValue(hashTable, hashKey);, or something more exotic, in case your language does not have syntax for function arguments, or any syntax for functions at all.
Name:
Anonymous2006-09-01 16:10
>>81
Which goes back to the orignal point that it's the algorithm that matters not the language's syntax.
>>80
Yes, but it's just not the same when you don't have native language syntax support, lvalues, immediates, operators, etc.
Name:
Anonymous2006-09-01 22:37
>>80
You don't see the difference between coding and debugging a hash implementation, and using something like []? That's the difference between a couple hours and a few seconds.
>>82
They both matter. In the end everything you do is just some fancy way of making a universal turing machine do what your want, the difference being how much pain it'll take implement the same algorithm.
Yes. I'm a C programmer. So? I don't see a problem. I embraced my UNIX soul long ago and I am happy together with my compiler (who is a cute layered front/backend design!). We have a fucking lot of functions in and outside of the kernel and I am pretty compact and resource conserving.
But thanks anyway asshole. Go and beat off to your stupid garbage collection shit while I #INCLUDE <stdio.h> with my preprocessor.
(defmacro with-bbcoeds (&body body)
"Macro/S-EXP-based (A)BBCODE compiler. Function names are the same
as BBCODE ones, with the exception of `rem' and `#' which have been
renamed to no-text and comment, to avoid shadowing standard CL forms,
and dispatch macro characters. Quotes are not yet supported." (labels ((downcase (s) (string-downcase (string s))) (canonicalize-wrapper-name (name) (etypecase name (symbol (values name nil (downcase name))) (list (destructuring-bind (function-name &key (single nil) (literal nil literal-present-p))
name (values function-name single (if literal-present-p literal (downcase function-name))))))) (tag-wrapper (name) (with-gensyms (args) (multiple-value-bind (name single literal) (canonicalize-wrapper-name name)
`(,name ,@(if single
`(() `(make-tag ,',literal))
`((&body ,args)
`(wrap-tag ,',literal ,@,args))))))) (tag-wrappers (names body)
`(macrolet ,(mapcar #'tag-wrapper names)
,@body)))
`(labels ((append-strings (&rest strings) (apply #'concatenate 'string (mapcar #'string strings))) (make-tag (tag) (append-strings "[" tag "]")) (make-end-tag (tag) (append-strings "[/" tag "]")) (wrap-tag (name &rest args) (append-strings (make-tag name) (apply #'append-strings args) (make-end-tag name))))
,(tag-wrappers '(b u i o s m code spoiler sup sub aa (no-text :literal "rem") (comment :literal #\#) (br :single t))
body))))
(defmacro with-bbcoeds (&body body)
"Macro/S-EXP-based (A)BBCODE compiler. Function names are the same
as BBCODE ones, with the exception of `rem' and `#' which have been
renamed to no-text and comment, to avoid shadowing standard CL forms,
and dispatch macro characters. Quotes are not yet supported." (labels ((downcase (s) (string-downcase (string s))) (canonicalize-wrapper-name (name) (etypecase name (symbol (values name nil (downcase name))) (list (destructuring-bind (function-name &key (single nil) (literal nil literal-present-p))
name (values function-name single (if literal-present-p literal (downcase function-name))))))) (tag-wrapper (name) (with-gensyms (args) (multiple-value-bind (name single literal) (canonicalize-wrapper-name name)
`(,name ,@(if single
`(() `(make-tag ,',literal))
`((&body ,args)
`(wrap-tag ,',literal ,@,args))))))) (tag-wrappers (names body)
`(macrolet ,(mapcar #'tag-wrapper names)
,@body)))
`(labels ((append-strings (&rest strings) (apply #'concatenate 'string (mapcar #'string strings))) (make-tag (tag) (append-strings "[" tag "]")) (make-end-tag (tag) (append-strings "[/" tag "]")) (wrap-tag (name &rest args) (append-strings (make-tag name) (apply #'append-strings args) (make-end-tag name))))
,(tag-wrappers '(b u i o s m code spoiler sup sub aa (no-text :literal "rem") (comment :literal #\#) (br :single t))
body))))
Usage example:
(with-bbcoeds t (b (u (i (o (string-upcase "enterprise"))))))
=> "ENTERPRISE"
;;; rewrote some old implementation of FBS
;;; it's broken in its handling of spaces, but i'm too lazy to fix it now
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy