Comments (13)
Nothing is Something - Sandi Metz
First few minutes is about what is the alternative to if
statements in OOP world (or: how to implement Smalltalk style Boolean objects in Ruby).
from eo.
@pa9ey perfect idea. how about we create a section in README.md called "Lessons Learned" and list there things that we're aware about. We can say there, as a preface, that "We know about all this, we've seen these videos, don't think that we're re-inventing the wheel..." And then the list of things we've seen will go. What do you think?
from eo.
Nothing is Something - Sandi Metz
Very good this video!
from eo.
Ha! Maybe I've bitten off more than I can chew. :) I guess I was thinking of people, first, adding suggestions for a list of resources. (Then maybe I watch them all and try and catch up with you guys!!) (^;
But okay, I'll try and write something in the comments here about what I got from those videos and then see what people think.
(As I mention above, the edits are starting to get out of hand...)
from eo.
If anyone else has suggestions for videos or resources I'd certainly be interested to see them.
(This also seems very relevant to what we're trying to do, but I can't pretend I understand it all yet.)
from eo.
@pchmielowski Thanks for that! I've seen a couple of her videos (including that one I think) and I remember being impressed.
from eo.
@pa9ey -- These are extremely good points:
- Being able to do everything in a language makes doing anything at all more difficult. (Restrictions matter!)
- "I don't need a programming language. I need a coherent set of tools for creating software. A language is incidental." (I think this is very much on point.)
With respect to the latter, there was a very interesting project/technology tied to a compiler compiler project called PQCC: IDL (Interface Description Language, here's the specification) -- had PQCC realized its goals a huge chunk of those tools would be available. (I suspect PQCC's failure was more technical limitations of the time than the problem being unsolvable.)
I found out about IDL when researching Ada for a compiler project and stumbled on DIANA (here's DIANA RM revision 3, and revision 4 draft, if you're interested), which is an application of IDL. -- Anyway the reason to bring up IDL is that along with being germane to this wish to have tools rather than languages it has an interesting and unique (to my knowledge) concept of inheritance: a method to exclude items from being inherited.
The syntax/method they used was a keyword named without
-- see IDL spec PDF's page 24 (marked as page 18) -- where you can exclude a portion of the inherited structure.
This is eminently relevant for language-design because the standard definition for a type is "a set of values and a set of operations", this can be modeled directly in an OOP-language by an object having two fields: a set of values, and two a set of operations... and any language with subtypes, which are merely the addition of constraints upon the values, like Positive
is a subtype of Integer
with constraint X > 0
imposed upon the values.
So using Integer
and Positive
again, we could conceptually describe the types as something like:
Integer = (values: -2**(machine.word_length-1)..2**(machine.word_length-1)-1, operations: Arithmetic_ops)
and
Positive = Integer without values x such that x < 0
Or whatever. (The textual representation and syntax here don't matter, it's the concept that's important; though there is the implicit assumption here that we're dealing with a 2's complement machine here.)
Now, with respect to the former point ("Restrictions matter!"), this is self-evident to anyone who's used subtypes, but it's also the key realization for Ada's generic system which has the interesting property of static polymorphism.
(I'll move what I was going to say about Ada's generics to #1 where it's more directly on-topic.)
The power of being able to add constraints (that is, subtyping) can simplify things immensely, as well as enhance correctness; an example:
Type Window is tagged private; -- Whatever, it's just a stub.
Type Pointer is access Window'Class; -- A pointer to Window, or anything deriving from it.
Subtype Handle is not null Pointer; -- A pointer with NULL excluded.
Procedure Set_Title ( Window : Handle; Text : String ); -- Function header/declaration.
Within the body of Set_Title
, the checking of parameter "Window" being null is completely unneeded because it's ensured non-null by the parameter, because the restriction is on/in the definition of Handle
.
Things like the "if operator" being an object reminds me of "parselets" from Nystrom's "Pratt Parsers: Expression Parsing Made Easy" article and his example on github and how these "parslets" essentially construct the objects for the parse-tree.
The idea of having an "if operator"-object also beings to mind Forth which owes a lot of its flexibility and simplicity to it's definition of "word" --the Forth equivalent of a subprogram-- which is: either a list of words, or a chunk of machine code. (This definition also forms the basis for other interesting properties.)
On the other hand of the high-/low-level language scale we have Lisp, which similarly deals with lists at the fundamental level, but owes its flexibility to its homoiconicity: the representation of the program itself as data. (Lisp's macros are quite impressive when it comes to meta-programming, as shown by this stackoverflow answer, and the heart of the macro is homoiconicity: "_Before I go further: I should explain a little bit of what a macro is. It is a transform of code by code to code. That is a piece of code read by the interpreter (or compiler) which takes in code as an argument does a manipulation and the returns the result which is then run in place. _")
All of these tie together: we can have a system where everything is represented by objects, where we have objects [well, methods] to operate on objects and treat programs like objects.
from eo.
@OneWingedShark Thanks! This is all fascinating stuff. Although I'm running to catch up a bit. I think I have a lot of reading to do! :)
from eo.
Still not really sure what the outcome of this issue should be (I'm quickly getting out of my depth), but I think I'll keep it open for now because there are some interesting things here.
from eo.
@pa9ey
The links for PQCC, IDL, and DIANA are just to their wikipedia pages, and the stackoverflow link isn't terribly bad either.
The Pratt Parsers post takes more time to mull over (and possibly play with) than it does to read.
It's the IDL spec and DIANA RM that are of any appreciable length, and you can safely ignore DIANA's 4th revision draft.
from eo.
I would propose my object-oriented modeling project. The key ideas of the project are the following:
- Object-modeling core. Totally declarative decomposition: collaborating objects, template messages, and nothing else. Only high abstractions and pure problem domain terms. Adjusted object-oriented concepts.
- Escalating the role of aspects. Cross-cutting concerns via alternative naming and projections.
- Explicit data model. Associations as an abstract way to define data relations.
- Unification and explicit applying of resources. Separation of object modeling and resource programming. Resources are memory and code (algorithms). All resources are assigned to model abstractions via productions. Separation resources to managed and unmanaged is incidental.
- Meta features for manipulating modeling and code elements. Generating output code from transformed models. Open object modeling semantic via transformations.
- Powerful tools via IDE. Alternative source code presentation via hybrid trees instead of plain text. Plain text is incident. Real-time weaving and meta processing. Transpilation into readable and debuggable output code.
Maybe it can be used in eolang in some manners.
from eo.
Job gh:yegor256/eo#5
is not assigned, can't get performer
from eo.
This job is not in scope
from eo.
Related Issues (20)
- Can't convert EO example in the README to PHI HOT 5
- Make XSD as powerful and as restrictive as possible HOT 1
- `PullMojo` and `ResolveMojo` are not proxy-aware HOT 1
- Move `eo-sys` to `eo-runtime` HOT 3
- File name too long HOT 4
- pom.xml:340-343: Enable PMD check for... HOT 2
- BytesOf.java:34-38: This class requires refactoring. As a... HOT 4
- Data.java:196-199: This method should be refactored... HOT 2
- Can we use some static analysis like Sonar in CI on PR? HOT 1
- Failed build: daily HOT 10
- Add `+rt node` meta to work with js compiler HOT 1
- merge smaller libs into this repo HOT 7
- Printing PHI Expressions Extremely Slow HOT 4
- list.eo:208-211: The object does not work. After moving... HOT 2
- PhPackage need update HOT 2
- BytesRaw.java:33-36: Method {@link BytesOf#shift} should... HOT 2
- align-test-classes.xsl:27-28: Add link to corresponding... HOT 2
- remove-high-level-inner-classes.xsl:27-28: Create... HOT 14
- map.eo:105-112: Find a way to link hash code and index of... HOT 2
- text.eo:313-315: Implement text.replaced object. This... HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eo.