Is anyone using meta-meta-classes / meta-meta-meta-classes in Python/ other languages?
I recently discovered metaclasses in python.
Basically a metaclass in python is a class that creates a class. There are many useful reasons why you would want to do this - any kind of class initialisation for example. Registering classes on factories, complex validation of attributes, altering how inheritance works, etc. All of this becomes not only possible but simple.
But in python, metaclasses are also plain classes. So, I started wondering if the abstraction could usefully go higher, and it seems to me that it can and that:
- a metaclass corresponds to or implements a role in a pattern (as in GOF pattern languages).
- a meta-metaclass is the pattern itself (if we allow it to create tuples of classes representing abstract roles, rather than just a single class)
- a meta-meta-metaclass is a pattern factory, which corresponds to the GOF pattern groupings, e.g. Creational, Structural, Behavioural. A factory where you could describe a case of a certain type of problem and it would give you a set of classes that solved it.
- a meta-meta-meta-metaclass (as far as I could go), is a pattern factory factory, a factory to which you could perhaps describe the type of your problem and it would give you a pattern factory to ask.
I have found some stuff about this online, but mostly not very useful. One problem is that different languages define metaclasses slightly differently.
Has anyone else used metaclasses like this in python/elsewhere, or seen this used in the wild, or thought about it? What are the analogues in other languages? E.g. in C++ how deep can the template recursion go?
I'd very much like to research it further.
For deploy I'll be using Linux, but dev is done on Windows. Has anyone used it lately on Windows? Have you had any problems? Do you have an updated Makefile for VC++ that you can share? It seems the d
I am looking to implement a SIP VoIP client using any of the scripting languages - either perl, python or ruby or others. I have knowledge of SIP but have not tried anything with scripting languages.
My python program consists of several files: the main execution python script python modules in *.py files config file log files executables scripts of other languages. All this files should be ava
i am writing object with Model validation. My application is supposed to work with 3 languages( english, german and czech) How should i assign and after get appropriate language string for validation
I was searching a bit for another platform independent language like Java. Are there other P.I. languages? Thanks
I'm trying to change the default validation messages to other languages like French, Japanese or Chinese but there's only one default language(English) I can see in my project(I'm using Groovy/Grails
I want to write a Hebrew string in Python and then show it onscreen. The problem is that I get a mirror view of what I wrote. How can I set the string to use RTL instead of left to right?
My company is using Python for a relatively simple embedded project. Is anyone else out there using Python on embedded platforms? Overall it's working well for us, quick to develop apps, quick to debu
I want to create a system tray for my application using python tkinter. can anyone let me know how can I do the same using python tkinter?
am trying to build an app with a model which contains a unique of the title, some users will write the title in Arabic and other languages and when on save, I try to slugify the field. It would return
Can anyone point me to the list of languages that use double byte characters? Thanks,
Are there any other languages besides English or cultures, that append suffixes to Arabic Numerals such as 1st or 2nd? Do other cultures/locales use the English suffixes? Reference - Wikipedia I'm i
I want to write an application where multilingual data is stored in a database. There are posts with an unique ID which are written in several languages (at least 2 languages, other languages will pos
I am working on a internationalization project. Do other languages, such as Arabic or Chinese, use different representations for digits besides 0-9? If so, are there versions of atoi() that will accou
I have 2 languages in a app, english and spanish. I have an object named Job and Job has and attribute integer named max_day_on_complete In my view in english language I have: <%= pluralize(@job.ma
Possible Duplicate: Is there a goto statement in java? Why is goto considered evil in Java, and why is is not suitable for use in high-level programming languages?
Can i convert Image text like English,Spanish,French into other languages(Hindi,Spanish, Japanese, Chinese ets) in IPhone/IPAD ? iS it possible or not?? Example:- can i convert this image text into o
in how many languages /* ........... */ work as a comment? other than CSS
How can I use restrict option of the TextField class with other languages? For example for english is simple var tf:TextField = new TextField(); tf.restrict = A-Z a-z 0-9 ? . , ; ; How can I use i
I want to create my own systems for flash (like a scoreboard and made a feedback system) but I honestly have no clue where to even begin when it comes to implementing such things using AS3. I know how
Is it possible to use Tkinter to render user interfaces for RTL languages such as Arabic or Hebrew? I tried googling on tkinter rtl and the search results were disappointing. The Tk wiki indicates t
I'm soon going to be involved in a project to replace our current method of replication from transactional replication to some other method (for various reasons). I'm considering using CDC as an alter
How can I localize my application to support some Right to Left languages? How can I localize my application to support Hebrew? Arabic? and other languages? Thanks, Eyal.
What is the best way to approach writing a program in Python to translate English words and/or phrases into other languages?
Is there an API for speech to text for languages other then English? I know the API for English (http://developer.android.com/resources/articles/speech-input.html) but I want be able to recognize spee
I've got a pretty strong background in C-style languages. And have worked on several different types of projects. I have just started taking a serious look at Python after reading Programming Collecti
this is the idea. I'll have 'main' python script that will start (using subprocess) app1 and app2. 'main' script will send input to app1 and output result to app2 and vice versa (and main script will
How to get all childrens and grand childrens under home item in all languages if at all they have a version in the language? I want to achieve this using sitecore query. Below is the code that I am us
I am writing a desktop application using MVVM and Prism and I have the following problem. As well as the labels etc it is also necessary to store data in different languages. For example, in the USA a
It seems that most new programming languages that have appeared in the last 20 years have been written in C. This makes complete sense as C can be seen as a sort of portable assembly language. But wha
Has anyone used Moonlight for real time app development? Is it really worth spending time with it? -Fahad
Which scripting languages does Git hooks support? I see examples of Python, Ruby and Bash. Are these the only ones? I'm mainly interested in using it on windows at the moment and am not proficient in
I am using Ubuntu 12.04 on a 64bit laptop. I am trying to open an application using python code. import os os.system(open /home/utsav/ab.txt) It gives the following error: Couldn't get a file desc
This will be my first attempt to code a DLL in Delphi for calling from other languages. I have done a lot of googling and see a few good pointers, but nothing exhaustive (at least, I have questions th
Has PastryKit been successfully implemented by anyone other than Apple? This article and others give a detailed breakdown and source code of PastryKit but has anyone actually got their own content int
I have heard a lot that PHP is slow compared other languages. Is the speed difference noticeable enough that I should switch to another language? And if so what other language would you recommend? Or
Does anyone know of a Python equivalent for FMPP the text file preprocessor? Follow up: I am reading the docs and looking at the examples for the suggestions given. Just to expand. My usage of FMPP is
I am using Python and I would like to check the location of a value in a list of lists against other indexes. Like if I had 1 at (1, 1) I would want to be able to check if 1 were at the other indexes
I sometimes want to output the contents of a pipe in the middle (don't we all?). I generally do it like this (yes, I know there are other, probably better, ways): terminal=$(tty) echo hello world |tee
Are there any good reason to learn languages such as Ada and COBOL? Are there any future in programming in those languages? I'm interested in those languages and i'm currently learning them just for f
I am using googles protocol buffers, ruby-protobuf, with rails and ActiveRecord. The protocol itself seems like a good choice, especially since we are connecting to mobile devices. Its a very compact
I asked a question before about how to do multiprocessing in Python (although I did not use the word multiprocessing in the former question, because I was not sure I was asking about that yet). Now I
There are some languages which support deterministic lightweight concurrency - coroutine. Lua - coroutine Stack-less Python - tasklet Ruby - fiber should be many more... but currently I don't have mu
First of all, let me say that I've never used C# before, and I don't know about it much. I was studying for my Programming Languages exam with Sebesta's Concepts of Programming Languages 9th ed bo
I haven't heard of any, most languages seem to just have division of ints round or be a floating point number. Was it found to be a problem in scheme and so not used in other languages?
It strikes me as a bit odd that I have heard of loads of undefined behavior examples from C and C++ but not from other Languages, where I also know that C and C++ are used in many situations where rel
Has anyone tried the NetBeans 6.5 Python IDE? What are your opinions? Is it better/worse than PyDev? Do you like it? How does it integrate with source control tools (especially Mercurial)?
Is there a module that allows me to manage other programs using python (for example to check the position of the cursor on the screen and move it to the other place)? If it does exist please give me i
Is it possible to view namespaces other than Global in the Spyder variable explorer? I'd like to clean up my code to get things into main(), but I still need to take a look at variable contents at thi
I wonder why a lot of programmers claim that Lua is faster than any other scripting language? What did they do that is more efficient than other languages? Is there something completely different in t