From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Check for redundancy Date: Fri, 03 Jul 2015 00:37:42 +0100 Message-ID: <87mvzerv09.fsf@robertthorpeconsulting.com> References: <87si9bl7k7.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435880291 3556 80.91.229.3 (2 Jul 2015 23:38:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jul 2015 23:38:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 03 01:38:01 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZAo3N-00080m-I2 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 01:38:01 +0200 Original-Received: from localhost ([::1]:38723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAo3M-0001MH-OU for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jul 2015 19:38:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAo3C-0001MA-Jx for help-gnu-emacs@gnu.org; Thu, 02 Jul 2015 19:37:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAo37-00070j-LC for help-gnu-emacs@gnu.org; Thu, 02 Jul 2015 19:37:50 -0400 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:41477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAo37-00070b-F6 for help-gnu-emacs@gnu.org; Thu, 02 Jul 2015 19:37:45 -0400 Original-Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 9348F99140 for ; Thu, 2 Jul 2015 23:37:43 +0000 (UTC) Original-Received: (qmail 1340 invoked from network); 2 Jul 2015 23:37:43 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.77.242.57]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 2 Jul 2015 23:37:43 -0000 In-Reply-To: <87si9bl7k7.fsf@nl106-137-147.student.uu.se> (message from Emanuel Berg on Mon, 29 Jun 2015 01:47:04 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105370 Archived-At: Emanuel Berg writes: > Robert Thorpe writes: >> Just because there aren't types doesn't mean that >> variables don't have types. What "untyped" means is >> that the language doesn't enforce typing for you. >> That makes it more important that you manage them >> carefully for yourself. > > ... are you sure? > > In C, you do > > int five = 5; > > In Lisp (Elisp), you do > > (let ((five 5)) ...) I don't understand what this has to do with the issue. Both of the languages here have types. C has static types and Lisp has latent (or dynamic) types. What about assembly language? What about other languages with no type system or a very limited type system? > If you want to, you can do (integerp five) In Lisp the type of a variable is stored with the variable at runtime. In C the type of a variable is recorded and enforced at compile time. In many Assembly languages neither are done. You can't ask the variable what it's type is and you can't ask the compiler either. The only record is in your program and in your mind. > Yeah, I think there is a misunderstanding where you > think I say you cannot mention types, encodings, > units, etc. ever in variable names, i.e. you should > never name something in terms of technology. > That isn't so; I agree there are such cases when that > is called for. In that case I don't think our opinions about this differ too much. > However, the way I understood HN is that you should > *always* use prefixes like that. What I remembered it > looked like this: > > intMoney = 0; > strGreeting = "Stay a while, and listen!"; > > And I don't see any reason to do that. It's useful in assembly language programming. It's also useful in MS Window programming where everything is some kind of handle. Even then though, I would only use it for the user interface, not every variable as you say. BR, Rob