Remix.run Logo
▲ CyberDildonics 15 hours ago

a more fleshed out exemplar

What's the difference between an exemplar and an example?

between “OOP” and “sir, this is C”.

That's more templates, ownership and operator overloading.

Polymorphism is not a modern way to program because it introduces dependencies and enormous speed hits from pointer chasing, both of which are corrosive to a good program.

▲cestith 11 hours ago | parent [-]

An example is any random instance of something that illustrates a concept. You can load up a document with examples to demonstrate a range of possibilities. An exemplar is the chosen best way to model and explain a concept.

So in a programming text for a new language, one would use examples of things that are strings, or examples of structures one might declare. You might even see examples of multiple ways to solve a problem in code. An exemplar though shows the one best - or at least most recommended - way to do something in the language.

▲CyberDildonics 9 hours ago | parent [-]

An exemplar is the chosen best way to model and explain a concept.

Why would you use a worse example and how do you know the example you are looking at is the best?

▲cestith 9 hours ago | parent [-]

You'd choose something that's less than ideal if you're including multiple examples, because it's unlikely every example is the best one. You might give an example labelled specifically as a bad example. The word exemplar might be more familiar to many English speakers as the form "exemplary".

It can be difficult to know if your example is the exemplar. It can be reasonably assumed that if the creator of the language provides only one example, it at least should be the best one. It is at least the best one in the docs if it's the only one.

▲CyberDildonics 8 hours ago | parent [-]

They said a 'more fleshed out exemplar' which means that the current exemplar must not be an exemplar.

▲cestith 4 hours ago | parent [-]

I suppose that depends on whether by "best example" one means "the best example presented", "the best example extant", or "the best example possible".