[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How comes most - actually used - languages have a shitty metaprogramming

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 17
Thread images: 1

File: metaprogramming.jpg (426KB, 857x1202px) Image search: [Google]
metaprogramming.jpg
426KB, 857x1202px
You'd think programmers would be interested in loading metaprogramming work to the one thing that knows it best, the compiler...
>>
>>61129594
First and last bump.
>>
TL;DR: Historical accidents and path dependence.

C is old, ad hoc and basically a reaction to more complicated systems and languages; the implications of its preprocessor and not having modules weren't fully understood at the time. C++ tried to add safer metaprogramming to C. Java and C# deliberately avoided metaprogramming. JavaScript was designed in a two weeks and is now governed by conservative standards bodies. PHP wasn't designed at all. Python is the way it is on purpose. Perl is actually adapt at metaprogramming, but it's as baroque as the rest of Perl. Ruby and Scala are good at basic bitch DSL metaprogramming.
>>
>>61130631
>Php os hell
Sure it is. But I really hate Java with a passion. Endless factories and bizarre multitirered referebces
>>
brainlets
>>
>>61130631
How net avoid metaprogramming when you can emit assemblies and Il code at runtime?
>>
>>61129594
C++ metaprogramming is getting to be pretty good, they're finally going to fix the major problem with template-based generic programming (obscure error-messages) by using Concepts. I don't know if you could call C#'s Roslyn metaprogramming, but it does expose the compiler as an API for external usage (code analysis and refactoring).
>>
>>61130729
He probably meant proper in-language metaprogramming beyond that very basic stuff what generics + operator overloading offer.
>>
>>61130729
See the OP pic.
>>
>>61130741
>C++ metaprogramming is getting to be pretty good, they're finally going to fix the major problem with template-based generic programming (obscure error-messages) by using Concepts.
>tfw you realize C++ should have avoided templates, concepts and the now proposed metaclasses and instead have a compile time interpreter with AST introspection API which is more powerful AND gives better error messages.
>>
>>61130729
It is metaprogramming but vaguely on the same level as textual replacements.
>>
>>61130799
http://lgdv.cs.fau.de/publications/publication/Pub.2014.tech.IMMD.IMMD9.defmac/
>>
>>61130862
>C
>Lisp
>_expansion_ only

By the looks of it not what I'd want.
>>
where does lisp lie?
>>
>>61130799
They very deliberately avoided that approach, and as a lisp programmer for years who only recently started learning C++ I can see why.
>>
>>61130818
Yep it's more obscure and complex to perform. That is one thing that limits the platform
>>
C is for brainlets.
Thread posts: 17
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.